Package org.apache.cayenne.reflect
Class PropertyAccessor
- java.lang.Object
-
- org.apache.cayenne.reflect.PropertyAccessor
-
- All Implemented Interfaces:
Serializable,Accessor
public class PropertyAccessor extends Object implements Accessor
A utility accessor class that wraps a simple property.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected PropertyDescriptorproperty
-
Constructor Summary
Constructors Constructor Description PropertyAccessor(PropertyDescriptor property)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()Returns property name.ObjectgetValue(Object object)Returns a property value of an object without disturbing the object fault status.voidsetValue(Object object, Object newValue)Sets a property value of an object without disturbing the object fault status.
-
-
-
Field Detail
-
property
protected PropertyDescriptor property
-
-
Constructor Detail
-
PropertyAccessor
public PropertyAccessor(PropertyDescriptor property)
-
-
Method Detail
-
getValue
public Object getValue(Object object) throws PropertyException
Description copied from interface:AccessorReturns a property value of an object without disturbing the object fault status.- Specified by:
getValuein interfaceAccessor- Throws:
PropertyException
-
setValue
public void setValue(Object object, Object newValue) throws PropertyException
Description copied from interface:AccessorSets a property value of an object without disturbing the object fault status. Old value of the property is specified as a hint.- Specified by:
setValuein interfaceAccessor- Throws:
PropertyException
-
-