|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.property.SimpleProperty
org.apache.cayenne.property.AbstractSingleObjectArcProperty
org.apache.cayenne.property.ValueHolderProperty
public class ValueHolderProperty
Provides access to a property implemented as a ValueHolder Field. This implementation hides the fact of the ValueHolder existence. I.e. it never returns it from 'readPropertyDirectly', returning held value instead.
Field Summary |
---|
Fields inherited from class org.apache.cayenne.property.AbstractSingleObjectArcProperty |
---|
complimentaryReverseArcName, targetDescriptor |
Fields inherited from class org.apache.cayenne.property.SimpleProperty |
---|
accessor, owner |
Constructor Summary | |
---|---|
ValueHolderProperty(ClassDescriptor owner,
ClassDescriptor targetDescriptor,
PropertyAccessor accessor,
java.lang.String reverseName)
|
Method Summary | |
---|---|
protected ValueHolder |
createValueHolder(java.lang.Object object)
Creates a ValueHolder for an object. |
protected ValueHolder |
ensureValueHolderSet(java.lang.Object object)
Checks that an object's ValueHolder field described by this property is set, injecting a ValueHolder if needed. |
void |
injectValueHolder(java.lang.Object object)
Injects a ValueHolder in the object if it hasn't been done yet. |
boolean |
isFault(java.lang.Object object)
Returns true if a property ValueHolder is not initialized or is itself a fault. |
java.lang.Object |
readProperty(java.lang.Object object)
Returns a property value, resolving object fault if needed. |
java.lang.Object |
readPropertyDirectly(java.lang.Object object)
Returns a property value of an object without disturbing the object fault status. |
void |
shallowMerge(java.lang.Object from,
java.lang.Object to)
Copies a property value from one object to another. |
void |
writeProperty(java.lang.Object object,
java.lang.Object oldValue,
java.lang.Object newValue)
Sets a property value,resolving object fault if needed. |
void |
writePropertyDirectly(java.lang.Object object,
java.lang.Object oldValue,
java.lang.Object newValue)
Sets a property value of an object without disturbing the object fault status. |
Methods inherited from class org.apache.cayenne.property.AbstractSingleObjectArcProperty |
---|
getComplimentaryReverseArc, getTargetDescriptor, setReverse, setTarget, visit |
Methods inherited from class org.apache.cayenne.property.SimpleProperty |
---|
getName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cayenne.property.PropertyAccessor |
---|
getName |
Constructor Detail |
---|
public ValueHolderProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor, PropertyAccessor accessor, java.lang.String reverseName)
Method Detail |
---|
public boolean isFault(java.lang.Object object)
isFault
in interface ArcProperty
isFault
in class AbstractSingleObjectArcProperty
public java.lang.Object readPropertyDirectly(java.lang.Object object) throws PropertyAccessException
PropertyAccessor
readPropertyDirectly
in interface PropertyAccessor
readPropertyDirectly
in class SimpleProperty
PropertyAccessException
public java.lang.Object readProperty(java.lang.Object object) throws PropertyAccessException
Property
readProperty
in interface Property
readProperty
in class SimpleProperty
PropertyAccessException
public void writePropertyDirectly(java.lang.Object object, java.lang.Object oldValue, java.lang.Object newValue) throws PropertyAccessException
PropertyAccessor
writePropertyDirectly
in interface PropertyAccessor
writePropertyDirectly
in class SimpleProperty
PropertyAccessException
public void writeProperty(java.lang.Object object, java.lang.Object oldValue, java.lang.Object newValue) throws PropertyAccessException
Property
writeProperty
in interface Property
writeProperty
in class SimpleProperty
PropertyAccessException
public void shallowMerge(java.lang.Object from, java.lang.Object to) throws PropertyAccessException
Property
shallowMerge
in interface Property
shallowMerge
in class SimpleProperty
PropertyAccessException
public void injectValueHolder(java.lang.Object object) throws PropertyAccessException
injectValueHolder
in interface Property
injectValueHolder
in class SimpleProperty
PropertyAccessException
protected ValueHolder ensureValueHolderSet(java.lang.Object object) throws PropertyAccessException
PropertyAccessException
protected ValueHolder createValueHolder(java.lang.Object object) throws PropertyAccessException
PropertyAccessException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |