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

## org.apache.cayenne.property
Class SimpleProperty

    java.lang.Object
      org.apache.cayenne.property.SimpleProperty

All Implemented Interfaces:
  java.io.Serializable, Property, PropertyAccessor

Direct Known Subclasses:
  AbstractSingleObjectArcProperty

    public class SimpleProperty

extends java.lang.Object
implements Property

A property descriptor that provides access to a simple object property, delegating property read/write operations to an accessor.

Since:
  1.2
Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected PropertyAccessor` | `accessor`
`protected ClassDescriptor` | `owner`

Constructor Summary
`SimpleProperty(ClassDescriptor owner, PropertyAccessor accessor)`

Method Summary
`java.lang.String` | `getName()` Returns property name.
`void` | `injectValueHolder(java.lang.Object object)` Does nothing.
`java.lang.Object` | `readProperty(java.lang.Object object)` Returns a property value, resolving object fault if needed.
`java.lang.Object` | `readPropertyDirectly(java.lang.Object object)` Returns a property value of an object without disturbing the object fault status.
`void` | `shallowMerge(java.lang.Object from, java.lang.Object to)` Copies a property value from one object to another.
`boolean` | `visit(PropertyVisitor visitor)`
`void` | `writeProperty(java.lang.Object object, java.lang.Object oldValue, java.lang.Object newValue)` Sets a property value,resolving object fault if needed.
`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

### owner

    protected ClassDescriptor owner

### accessor

    protected PropertyAccessor accessor

Constructor Detail

### SimpleProperty

    public SimpleProperty(ClassDescriptor owner,
                          PropertyAccessor accessor)

Method Detail

### readProperty

    public java.lang.Object readProperty(java.lang.Object object)
                                  throws PropertyAccessException

  Description copied from interface: `Property`
  Returns a property value, resolving object fault if needed.

  Specified by:
    `readProperty` in interface `Property`
  Throws:
    `PropertyAccessException`

### writeProperty

    public void writeProperty(java.lang.Object object,
                              java.lang.Object oldValue,
                              java.lang.Object newValue)
                       throws PropertyAccessException

  Description copied from interface: `Property`
  Sets a property value,resolving object fault if needed. Old value of the property is specified as a hint.

  Specified by:
    `writeProperty` in interface `Property`
  Throws:
    `PropertyAccessException`

### getName

    public java.lang.String getName()

  Description copied from interface: `PropertyAccessor`
  Returns property name.

  Specified by:
    `getName` in interface `PropertyAccessor`

### visit

    public boolean visit(PropertyVisitor visitor)

  Specified by:
    `visit` in interface `Property`

### injectValueHolder

    public void injectValueHolder(java.lang.Object object)
                           throws PropertyAccessException

  Does nothing.

  Specified by:
    `injectValueHolder` in interface `Property`
  Throws:
    `PropertyAccessException`

### shallowMerge

    public void shallowMerge(java.lang.Object from,
                             java.lang.Object to)
                      throws PropertyAccessException

  Description copied from interface: `Property`
  Copies a property value from one object to another.

  Specified by:
    `shallowMerge` in interface `Property`
  Throws:
    `PropertyAccessException`

### readPropertyDirectly

    public java.lang.Object readPropertyDirectly(java.lang.Object object)
                                          throws PropertyAccessException

  Description copied from interface: `PropertyAccessor`
  Returns a property value of an object without disturbing the object fault status.

  Specified by:
    `readPropertyDirectly` in interface `PropertyAccessor`
  Throws:
    `PropertyAccessException`

### writePropertyDirectly

    public void writePropertyDirectly(java.lang.Object object,
                                      java.lang.Object oldValue,
                                      java.lang.Object newValue)
                               throws PropertyAccessException

  Description copied from interface: `PropertyAccessor`
  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:
    `writePropertyDirectly` in interface `PropertyAccessor`
  Throws:
    `PropertyAccessException`

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

Copyright © 2001-2006 Apache.org All Rights Reserved.