|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.property.FieldAccessor
public class FieldAccessor
A PropertyAccessor that performs direct Field access.
Field Summary | |
---|---|
protected java.lang.reflect.Field |
field
|
protected java.lang.Object |
nullValue
|
protected java.lang.String |
propertyName
|
Constructor Summary | |
---|---|
FieldAccessor(java.lang.Class objectClass,
java.lang.String propertyName,
java.lang.Class propertyType)
|
Method Summary | |
---|---|
java.lang.String |
getName()
Returns property name. |
protected java.lang.reflect.Field |
lookupFieldInHierarchy(java.lang.Class beanClass,
java.lang.String fieldName)
Recursively looks for a named field in a class hierarchy. |
protected java.lang.reflect.Field |
prepareField(java.lang.Class beanClass,
java.lang.String propertyName,
java.lang.Class propertyType)
Finds a field for the property, ensuring that direct access via reflection is possible. |
java.lang.Object |
readPropertyDirectly(java.lang.Object object)
Returns a property value of an object without disturbing the object fault status. |
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String propertyName
protected java.lang.reflect.Field field
protected java.lang.Object nullValue
Constructor Detail |
---|
public FieldAccessor(java.lang.Class objectClass, java.lang.String propertyName, java.lang.Class propertyType)
Method Detail |
---|
public java.lang.String getName()
PropertyAccessor
getName
in interface PropertyAccessor
public java.lang.Object readPropertyDirectly(java.lang.Object object) throws PropertyAccessException
PropertyAccessor
readPropertyDirectly
in interface PropertyAccessor
PropertyAccessException
public void writePropertyDirectly(java.lang.Object object, java.lang.Object oldValue, java.lang.Object newValue) throws PropertyAccessException
PropertyAccessor
writePropertyDirectly
in interface PropertyAccessor
PropertyAccessException
protected java.lang.reflect.Field prepareField(java.lang.Class beanClass, java.lang.String propertyName, java.lang.Class propertyType)
protected java.lang.reflect.Field lookupFieldInHierarchy(java.lang.Class beanClass, java.lang.String fieldName) throws java.lang.SecurityException, java.lang.NoSuchFieldException
java.lang.SecurityException
java.lang.NoSuchFieldException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |