org.apache.cayenne.reflect

## Class SimpleAttributeProperty

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

- All Implemented Interfaces:
    AttributeProperty, PropertyDescriptor

      public class SimpleAttributeProperty
      extends BaseProperty
      implements AttributeProperty

  A descriptor of an "attribute" persistent property.
  Since:
    3.0

- - ### Field Summary

    - ### Fields inherited from class org.apache.cayenne.reflect.BaseProperty

      `accessor, owner`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleAttributeProperty(ClassDescriptor owner, Accessor accessor, ObjAttribute attribute)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ObjAttribute` | `getAttribute()`
    `Object` | `readProperty(Object object)` Returns a property value, inflating unresolved object if need.
    `protected void` | `resolveFault(Object object)`
    `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.

    - ### Methods inherited from class org.apache.cayenne.reflect.BaseProperty

      `getName, injectValueHolder, readPropertyDirectly, toString, writePropertyDirectly`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.apache.cayenne.reflect.PropertyDescriptor

      `getName, injectValueHolder, readPropertyDirectly, writePropertyDirectly`

- - ### Constructor Detail

    - #### SimpleAttributeProperty

          public SimpleAttributeProperty(ClassDescriptor owner,
                                         Accessor accessor,
                                         ObjAttribute attribute)

  - ### Method Detail

    - #### visit

          public boolean visit(PropertyVisitor visitor)

      Description copied from interface: `PropertyDescriptor`
      A visitor accept method.
      Specified by:
        `visit` in interface `PropertyDescriptor`
      Specified by:
        `visit` in class `BaseProperty`
      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.

    - #### getAttribute

          public ObjAttribute getAttribute()

      Specified by:
        `getAttribute` in interface `AttributeProperty`

    - #### readProperty

          public Object readProperty(Object object)
                              throws PropertyException

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

    - #### writeProperty

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

      Description copied from interface: `PropertyDescriptor`
      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 `PropertyDescriptor`
      Overrides:
        `writeProperty` in class `BaseProperty`
      Throws:
        `PropertyException`

    - #### resolveFault

          protected void resolveFault(Object object)
                               throws PropertyException

      Throws:
        `PropertyException`

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