org.apache.cayenne.reflect

## Class BaseProperty

- java.lang.Object
- - org.apache.cayenne.reflect.BaseProperty

- All Implemented Interfaces:
    Property
  Direct Known Subclasses:
    BaseArcProperty, SimpleAttributeProperty

      public abstract class BaseProperty
      extends Object
      implements Property

  An abstract property descriptor that delegates property access to an `Accessor`. Used as a superclass for other implementations.
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Accessor` | `accessor`
    `protected ClassDescriptor` | `owner`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseProperty(ClassDescriptor owner, Accessor accessor)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Returns property name.
    `void` | `injectValueHolder(Object object)` Does nothing.
    `Object` | `readProperty(Object object)` Returns a property value, inflating unresolved object if need.
    `Object` | `readPropertyDirectly(Object object)` Returns a property value of an object without disturbing the object fault status.
    `String` | `toString()`
    `abstract boolean` | `visit(PropertyVisitor visitor)` A visitor accept method.
    `void` | `writeProperty(Object object, Object oldValue, Object newValue)` Sets a property value, inflating unresolved object if need.
    `void` | `writePropertyDirectly(Object object, Object oldValue, 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, wait, wait, wait`

- - ### Field Detail

    - #### owner

          protected ClassDescriptor owner

    - #### accessor

          protected Accessor accessor

  - ### Constructor Detail

    - #### BaseProperty

          public BaseProperty(ClassDescriptor owner,
                      Accessor accessor)

  - ### Method Detail

    - #### readProperty

          public Object readProperty(Object object)
                              throws PropertyException

      Description copied from interface: `Property`
      Returns a property value, inflating unresolved object if need.
      Specified by:
        `readProperty` in interface `Property`
      Throws:
        `PropertyException`

    - #### writeProperty

          public void writeProperty(Object object,
                           Object oldValue,
                           Object newValue)
                             throws PropertyException

      Description copied from interface: `Property`
      Sets a property value, inflating unresolved object if need. Old value of the property is specified as a hint and can be ignored by the property implementor.
      Specified by:
        `writeProperty` in interface `Property`
      Throws:
        `PropertyException`

    - #### getName

          public String getName()

      Description copied from interface: `Property`
      Returns property name.
      Specified by:
        `getName` in interface `Property`

    - #### visit

          public abstract boolean visit(PropertyVisitor visitor)

      Description copied from interface: `Property`
      A visitor accept method.
      Specified by:
        `visit` in interface `Property`
      Returns:
        a status returned by the corresponding callback method of the visitor. It serves as an indication of whether peer properties processing is still needed.

    - #### injectValueHolder

          public void injectValueHolder(Object object)
                                 throws PropertyException

      Does nothing.
      Specified by:
        `injectValueHolder` in interface `Property`
      Throws:
        `PropertyException`

    - #### readPropertyDirectly

          public Object readPropertyDirectly(Object object)
                                      throws PropertyException

      Description copied from interface: `Property`
      Returns a property value of an object without disturbing the object fault status.
      Specified by:
        `readPropertyDirectly` in interface `Property`
      Throws:
        `PropertyException`

    - #### writePropertyDirectly

          public void writePropertyDirectly(Object object,
                                   Object oldValue,
                                   Object newValue)
                                     throws PropertyException

      Description copied from interface: `Property`
      Sets a property value of an object without disturbing the object fault status. Old value of the property is specified as a hint and can be ignored by the property implementor.
      Specified by:
        `writePropertyDirectly` in interface `Property`
      Throws:
        `PropertyException`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2001–2014 Apache Cayenne. All rights reserved.