Package org.apache.cayenne.reflect
Class EmbeddedFieldAccessor
java.lang.Object
org.apache.cayenne.reflect.EmbeddedFieldAccessor
- All Implemented Interfaces:
Serializable
,Accessor
An accessor for fields storing embedded objects. This accessor will initialize null
fields with appropriate embeddable objects when needed during get and set calls.
- Since:
- 3.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Accessor
protected EmbeddableDescriptor
protected Accessor
protected String
-
Constructor Summary
ConstructorDescriptionEmbeddedFieldAccessor
(EmbeddableDescriptor embeddableDescriptor, Accessor embeddedAccessor, Accessor embeddableAccessor) -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getEmbeddable
(Object owner) Returns an embeddable object for the owner object, initializing embeddable if it is null.getName()
Returns property name.Returns a property value of an object without disturbing the object fault status.void
Sets a property value of an object without disturbing the object fault status.
-
Field Details
-
propertyPath
-
embeddedAccessor
-
embeddableAccessor
-
embeddableDescriptor
-
-
Constructor Details
-
EmbeddedFieldAccessor
public EmbeddedFieldAccessor(EmbeddableDescriptor embeddableDescriptor, Accessor embeddedAccessor, Accessor embeddableAccessor)
-
-
Method Details
-
getName
Description copied from interface:Accessor
Returns property name. -
getValue
Description copied from interface:Accessor
Returns a property value of an object without disturbing the object fault status.- Specified by:
getValue
in interfaceAccessor
- Throws:
PropertyException
-
setValue
Description copied from interface:Accessor
Sets a property value of an object without disturbing the object fault status. Old value of the property is specified as a hint.- Specified by:
setValue
in interfaceAccessor
- Throws:
PropertyException
-
getEmbeddable
Returns an embeddable object for the owner object, initializing embeddable if it is null. Currently supports only one level of embedding.
-