org.apache.cayenne.util

## Class RelationshipFault

- java.lang.Object
- - org.apache.cayenne.util.RelationshipFault

- Direct Known Subclasses:
    PersistentObjectHolder, PersistentObjectList, PersistentObjectMap, PersistentObjectSet

      public abstract class RelationshipFault
      extends Object

  An abstract superclass of lazily faulted to-one and to-many relationships.
  Since:
    1.2

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `relationshipName`
    `protected Persistent` | `relationshipOwner`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `RelationshipFault()`
    `` | `RelationshipFault(Persistent relationshipOwner, String relationshipName)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getRelationshipName()`
    `Persistent` | `getRelationshipOwner()`
    `protected boolean` | `isTransientParent()`
    `protected boolean` | `isUncommittedParent()`
    `protected abstract void` | `mergeLocalChanges(List resolved)`
    `protected List` | `resolveFromDB()` Executes a query that returns related objects.
    `protected void` | `updateReverse(List resolved)`

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

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

- - ### Field Detail

    - #### relationshipOwner

          protected Persistent relationshipOwner

    - #### relationshipName

          protected String relationshipName

  - ### Constructor Detail

    - #### RelationshipFault

          protected RelationshipFault()

    - #### RelationshipFault

          public RelationshipFault(Persistent relationshipOwner,
                                   String relationshipName)

  - ### Method Detail

    - #### getRelationshipName

          public String getRelationshipName()

    - #### getRelationshipOwner

          public Persistent getRelationshipOwner()

    - #### isTransientParent

          protected boolean isTransientParent()

    - #### isUncommittedParent

          protected boolean isUncommittedParent()

    - #### mergeLocalChanges

          protected abstract void mergeLocalChanges(List resolved)

    - #### resolveFromDB

          protected List resolveFromDB()

      Executes a query that returns related objects. Subclasses would invoke this method whenever they need to resolve a fault.

    - #### updateReverse

          protected void updateReverse(List resolved)

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