Package org.apache.cayenne.reflect

# Class BaseProperty

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

All Implemented Interfaces:
  `PropertyDescriptor`

Direct Known Subclasses:
  `BaseArcProperty`, `SimpleAttributeProperty`

public abstract class BaseProperty extends Object implements PropertyDescriptor
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
  Description
  `protected Accessor`
  `accessor`
  `protected ClassDescriptor`
  `owner`

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  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`

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

  `equals`

- ## Field Details

  - ### owner

    protected ClassDescriptor owner

  - ### accessor

    protected Accessor accessor

- ## Constructor Details

  - ### BaseProperty

    public BaseProperty(ClassDescriptor owner, Accessor accessor)

- ## Method Details

  - ### 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`
    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`
    Throws:
      `PropertyException`

  - ### getName

    public String getName()
    Description copied from interface: `PropertyDescriptor`
    Returns property name.
    Specified by:
      `getName` in interface `PropertyDescriptor`

  - ### visit

    public abstract boolean visit(PropertyVisitor visitor)
    Description copied from interface: `PropertyDescriptor`
    A visitor accept method.
    Specified by:
      `visit` in interface `PropertyDescriptor`
    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 `PropertyDescriptor`
    Throws:
      `PropertyException`

  - ### readPropertyDirectly

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

  - ### writePropertyDirectly

    public void writePropertyDirectly(Object object, Object oldValue, Object newValue) throws PropertyException
    Description copied from interface: `PropertyDescriptor`
    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 `PropertyDescriptor`
    Throws:
      `PropertyException`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`