Accessor (cayenne-doc: Cayenne Documentation 5.0-M2 API)
Description: declaration: package: org.apache.cayenne.reflect, interface: Accessor

# Interface Accessor

All Superinterfaces:
  `Serializable`

All Known Implementing Classes:
  `BeanAccessor, EmbeddedFieldAccessor, FieldAccessor, IdMapKeyAccessor, MapAccessor, PropertyAccessor`

public interface Accessor extends Serializable
An accessor of a property value. Abstracts the actual property implementation. E.g. it can be a Field, a pair of get/set methods or a map/Persistent.

Since:
  3.0

- ## Method Summary

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

- ## Method Details

  - ### getName

    String getName()
    Returns property name.

  - ### getValue

    Object getValue(Object object) throws PropertyException
    Returns a property value of an object without disturbing the object fault status.
    Throws:
      `PropertyException`

  - ### setValue

    void setValue(Object object, Object newValue) throws PropertyException
    Sets a property value of an object without disturbing the object fault status. Old value of the property is specified as a hint.
    Throws:
      `PropertyException`