Package org.apache.cayenne.reflect

## Class BaseToOneProperty

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

- All Implemented Interfaces:
    `ArcProperty`, `PropertyDescriptor`, `ToOneProperty`

      public abstract class BaseToOneProperty
      extends BaseArcProperty
      implements ToOneProperty

  A convenience base superclass for `ToOneProperty` implementors.
  Since:
    3.0

- - ### Field Summary

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

      `complimentaryReverseArcName, relationship, reverseDbPath, targetDescriptor`

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

      `accessor, owner`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `BaseToOneProperty​(ClassDescriptor owner, ClassDescriptor targetDescriptor, Accessor accessor, String reverseName)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `setTarget​(Object source, Object target, boolean setReverse)` |
    `boolean` | `visit​(PropertyVisitor visitor)` | A visitor accept method.

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

      `getComplimentaryReverseArc, getComplimentaryReverseDbRelationshipPath, getRelationship, getTargetDescriptor, isFault, setReverse`

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

      `getName, injectValueHolder, readProperty, readPropertyDirectly, toString, writeProperty, 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.ArcProperty

      `getComplimentaryReverseArc, getComplimentaryReverseDbRelationshipPath, getRelationship, getTargetDescriptor, invalidate, isFault`

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

      `equals, getName, injectValueHolder, readProperty, readPropertyDirectly, writeProperty, writePropertyDirectly`

- - ### Constructor Detail

    - #### BaseToOneProperty

          public BaseToOneProperty​(ClassDescriptor owner,
                                   ClassDescriptor targetDescriptor,
                                   Accessor accessor,
                                   String reverseName)

  - ### Method Detail

    - #### setTarget

          public void setTarget​(Object source,
                                Object target,
                                boolean setReverse)

      Specified by:
        `setTarget` in interface `ToOneProperty`

    - #### 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 `BaseArcProperty`
      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.