Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.reflect
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
Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected Accessor` | `embeddableAccessor`
`protected Accessor` | `embeddedAccessor`
`protected Class` | `embeddedClass`
`protected String` | `propertyPath`

Constructor Summary
`EmbeddedFieldAccessor(Class embeddableClass, Accessor embeddedAccessor, Accessor embeddableAccessor)`

Method Summary
`protected Object` | `createEmbeddable()`
`protected Object` | `getEmbeddable(Object owner)` Returns an embeddable object for the owner object, initializing embeddable if it is null.
`String` | `getName()` Returns property name.
`Object` | `getValue(Object object)` Returns a property value of an object without disturbing the object fault status.
`void` | `setValue(Object object, 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

### propertyPath

    protected String propertyPath

### embeddedAccessor

    protected Accessor embeddedAccessor

### embeddableAccessor

    protected Accessor embeddableAccessor

### embeddedClass

    protected Class embeddedClass

Constructor Detail

### EmbeddedFieldAccessor

    public EmbeddedFieldAccessor(Class embeddableClass,
                                 Accessor embeddedAccessor,
                                 Accessor embeddableAccessor)

Method Detail

### 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.

### createEmbeddable

    protected Object createEmbeddable()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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