org.apache.cayenne.reflect
Interface Property

All Known Subinterfaces:
ArcProperty, AttributeProperty, ToManyMapProperty, ToManyProperty, ToOneProperty
All Known Implementing Classes:
BaseArcProperty, BaseProperty, BaseToManyProperty, BaseToOneProperty, SimpleAttributeProperty

public interface Property

Defines bean property API used by Cayenne to access object data, do faulting and graph maintenance tasks.

Since:
1.2

Method Summary
 java.lang.String getName()
          Returns property name.
 void injectValueHolder(java.lang.Object object)
          If a property is implemented as a ValueHolder, this operation would create an unfaulted value holder and inject it into the object, if an object doesn't have it set yet.
 java.lang.Object readProperty(java.lang.Object object)
          Returns a property value, inflating unresolved object if need.
 java.lang.Object readPropertyDirectly(java.lang.Object object)
          Returns a property value of an object without disturbing the object fault status.
 boolean visit(PropertyVisitor visitor)
          A visitor accept method.
 void writeProperty(java.lang.Object object, java.lang.Object oldValue, java.lang.Object newValue)
          Sets a property value, inflating unresolved object if need.
 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.
 

Method Detail

getName

java.lang.String getName()
Returns property name.


readPropertyDirectly

java.lang.Object readPropertyDirectly(java.lang.Object object)
                                      throws PropertyException
Returns a property value of an object without disturbing the object fault status.

Throws:
PropertyException

readProperty

java.lang.Object readProperty(java.lang.Object object)
                              throws PropertyException
Returns a property value, inflating unresolved object if need.

Throws:
PropertyException

writePropertyDirectly

void writePropertyDirectly(java.lang.Object object,
                           java.lang.Object oldValue,
                           java.lang.Object newValue)
                           throws PropertyException
Sets a property value of an object without disturbing the object fault status. Old value of the property is specified as a hint and can be ignored by the property implementor.

Throws:
PropertyException

writeProperty

void writeProperty(java.lang.Object object,
                   java.lang.Object oldValue,
                   java.lang.Object newValue)
                   throws PropertyException
Sets a property value, inflating unresolved object if need. Old value of the property is specified as a hint and can be ignored by the property implementor.

Throws:
PropertyException

visit

boolean visit(PropertyVisitor visitor)
A visitor accept method.

Returns:
a status returned by the corresponding callback method of the visitor. It serves as an indication of whether peer properties processing is still needed.

injectValueHolder

void injectValueHolder(java.lang.Object object)
                       throws PropertyException
If a property is implemented as a ValueHolder, this operation would create an unfaulted value holder and inject it into the object, if an object doesn't have it set yet.

Throws:
PropertyException


Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.