Class EmbeddedFieldAccessor

java.lang.Object
org.apache.cayenne.reflect.EmbeddedFieldAccessor
All Implemented Interfaces:
Serializable, Accessor

public class EmbeddedFieldAccessor extends Object implements 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 Details

    • propertyPath

      protected String propertyPath
    • embeddedAccessor

      protected Accessor embeddedAccessor
    • embeddableAccessor

      protected Accessor embeddableAccessor
    • embeddableDescriptor

      protected EmbeddableDescriptor embeddableDescriptor
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Description copied from interface: Accessor
      Returns property name.
      Specified by:
      getName in interface Accessor
    • getValue

      public Object getValue(Object object) throws PropertyException
      Description copied from interface: Accessor
      Returns a property value of an object without disturbing the object fault status.
      Specified by:
      getValue in interface Accessor
      Throws:
      PropertyException
    • setValue

      public void setValue(Object object, Object newValue) throws PropertyException
      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 interface Accessor
      Throws:
      PropertyException
    • getEmbeddable

      protected Object getEmbeddable(Object owner)
      Returns an embeddable object for the owner object, initializing embeddable if it is null. Currently supports only one level of embedding.