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

# Class BaseArcProperty

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

All Implemented Interfaces:
  `ArcProperty, PropertyDescriptor`

Direct Known Subclasses:
  `BaseToManyProperty, BaseToOneProperty`

public abstract class BaseArcProperty extends BaseProperty implements ArcProperty
A base implementation of the `ArcProperty`.

Since:
  3.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected String`
  `complimentaryReverseArcName`
  `protected ObjRelationship`
  `relationship`
  `protected CayennePath`
  `reverseDbPath`
  `protected ClassDescriptor`
  `targetDescriptor`

  ### Fields inherited from class BaseProperty

  `accessor, owner`
  Modifier and Type
  Field
  Description
  `protected Accessor`
  `accessor`
  `protected ClassDescriptor`
  `owner`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BaseArcProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor, Accessor accessor, String reverseName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ArcProperty`
  `getComplimentaryReverseArc()`
  Returns a complimentary reverse ArcProperty or null if no reverse arc exists.
  `String`
  `getComplimentaryReverseDbRelationshipPath()`
  Returns a path over reverse DbRelationships for this arc's ObjRelationship.
  `ObjRelationship`
  `getRelationship()`
  Returns a relationship associated with this arc.
  `ClassDescriptor`
  `getTargetDescriptor()`
  Returns a ClassDescriptor for the type of graph nodes pointed to by this arc property.
  `abstract boolean`
  `isFault(Object source)`
  Returns whether a target node connected to a given object is an unresolved fault.
  `protected void`
  `setReverse(Object source, Object oldTarget, Object newTarget)`
  A convenience method to set the reverse arc used by subclasses.
  `abstract boolean`
  `visit(PropertyVisitor visitor)`
  A visitor accept method.

  ### Methods inherited from class BaseProperty

  `getName, injectValueHolder, readProperty, readPropertyDirectly, toString, writeProperty, writePropertyDirectly`
  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()`
  `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 Object

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

  ### Methods inherited from interface ArcProperty

  `invalidate`
  Modifier and Type
  Method
  Description
  `void`
  `invalidate(Object object)`
  Turns a property of an object into a fault.

  ### Methods inherited from interface PropertyDescriptor

  `equals`
  Modifier and Type
  Method
  Description
  `default boolean`
  `equals(Object value1, Object value2)`
  Allows to use special logic to compare values for equality as in rare cases it is not sufficient to use the default equals() method.

- ## Field Details

  - ### complimentaryReverseArcName

    protected String complimentaryReverseArcName

  - ### targetDescriptor

    protected ClassDescriptor targetDescriptor

  - ### relationship

    protected ObjRelationship relationship

  - ### reverseDbPath

    protected CayennePath reverseDbPath

- ## Constructor Details

  - ### BaseArcProperty

    public BaseArcProperty(ClassDescriptor owner, ClassDescriptor targetDescriptor, Accessor accessor, String reverseName)

- ## Method Details

  - ### visit

    public abstract 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.

  - ### isFault

    public abstract boolean isFault(Object source)
    Description copied from interface: `ArcProperty`
    Returns whether a target node connected to a given object is an unresolved fault.
    Specified by:
      `isFault` in interface `ArcProperty`
    Parameters:
      `source` - an object that is a source object of the relationship.

  - ### getComplimentaryReverseDbRelationshipPath

    public String getComplimentaryReverseDbRelationshipPath()
    Description copied from interface: `ArcProperty`
    Returns a path over reverse DbRelationships for this arc's ObjRelationship.
    Specified by:
      `getComplimentaryReverseDbRelationshipPath` in interface `ArcProperty`

  - ### getRelationship

    public ObjRelationship getRelationship()
    Description copied from interface: `ArcProperty`
    Returns a relationship associated with this arc.
    Specified by:
      `getRelationship` in interface `ArcProperty`

  - ### getComplimentaryReverseArc

    public ArcProperty getComplimentaryReverseArc()
    Description copied from interface: `ArcProperty`
    Returns a complimentary reverse ArcProperty or null if no reverse arc exists.
    Specified by:
      `getComplimentaryReverseArc` in interface `ArcProperty`

  - ### getTargetDescriptor

    public ClassDescriptor getTargetDescriptor()
    Description copied from interface: `ArcProperty`
    Returns a ClassDescriptor for the type of graph nodes pointed to by this arc property. Note that considering that a target object may be a subclass of the class handled by the descriptor, users of this method may need to call `ClassDescriptor.getSubclassDescriptor(String)` before using the descriptor to access objects.
    Specified by:
      `getTargetDescriptor` in interface `ArcProperty`

  - ### setReverse

    protected void setReverse(Object source, Object oldTarget, Object newTarget)
    A convenience method to set the reverse arc used by subclasses.