# Uses of Interface
org.apache.cayenne.Persistent

Packages that use Persistent
Package
Description
org.apache.cayenne
Contains persistence APIs directly accessible by users.
org.apache.cayenne.access
Contains classes that make up Cayenne ORM stack.
org.apache.cayenne.access.flush.operation
org.apache.cayenne.ashwood
org.apache.cayenne.exp
Cayenne data expression classes.
org.apache.cayenne.exp.property
Property API
org.apache.cayenne.graph
Contains generic graph management tools used in Cayenne.
org.apache.cayenne.map
Contains O/R mapping classes that store relational database metadata information and map it to Java classes.
org.apache.cayenne.query
Defines standard queries supported by Cayenne and extension mechanism to create custom queries.
org.apache.cayenne.reflect
org.apache.cayenne.util
General utility classes.

- ## Uses of Persistent in org.apache.cayenne

  Subinterfaces of Persistent in org.apache.cayenne
  Modifier and Type
  Interface
  Description
  `interface`
  `DataObject`
  Deprecated, for removal: This API element is subject to removal in a future version.
  use `Persistent` interface directly
  Classes in org.apache.cayenne that implement Persistent
  Modifier and Type
  Class
  Description
  `class`
  `BaseDataObject`
  Deprecated, for removal: This API element is subject to removal in a future version.
  use `PersistentObject` directly
  `class`
  `GenericPersistentObject`
  Implementation of `Persistent` that uses `Map` to store object fields.
  `class`
  `HybridPersistentObject`
  This data object like `GenericPersistentObject` uses `Map` to store generic attributes, only difference is that this Map will be created lazily at first write, thus reducing memory penalty if possible.
  `class`
  `PersistentObject`
  Base implementation of `Persistent`, have no assumption about how data is actually stored.
  Fields in org.apache.cayenne declared as Persistent
  Modifier and Type
  Field
  Description
  `protected Persistent`
  DeleteDenyException.`object`
  Methods in org.apache.cayenne with type parameters of type Persistent
  Modifier and Type
  Method
  Description
  `<T extends Persistent>
  T`
  ObjectContext.`localObject(T objectFromAnotherContext)`
  Returns a local copy of 'objectFromAnotherContext' object.
  Methods in org.apache.cayenne that return Persistent
  Modifier and Type
  Method
  Description
  `Persistent`
  DeleteDenyException.`getObject()`
  Methods in org.apache.cayenne that return types with arguments of type Persistent
  Modifier and Type
  Method
  Description
  `List<? extends Persistent>`
  PersistentObject.`setToManyTarget(String relName, Collection<? extends Persistent> values, boolean setReverse)`
  Sets the relationships to the specified `Persistent` objects.
  Methods in org.apache.cayenne with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `void`
  Persistent.`addToManyTarget(String relationshipName, Persistent target, boolean setReverse)`
  Adds an object to a to-many relationship.
  `void`
  PersistentObject.`addToManyTarget(String relName, Persistent value, boolean setReverse)`
  `static Map<String,Object>`
  Cayenne.`compoundPKForObject(Persistent object)`
  Returns a primary key map for a persistent object.
  `static ClassDescriptor`
  Cayenne.`getClassDescriptor(Persistent object)`
  Returns class descriptor for the object or null if the object is not registered with an ObjectContext or descriptor was not found.
  `static ObjEntity`
  Cayenne.`getObjEntity(Persistent p)`
  Returns mapped ObjEntity for object.
  `static PropertyDescriptor`
  Cayenne.`getProperty(Persistent object, String propertyName)`
  Returns property descriptor for specified property.
  `static int`
  Cayenne.`intPKForObject(Persistent object)`
  Returns an int primary key value for a persistent object.
  `static long`
  Cayenne.`longPKForObject(Persistent object)`
  Returns an int primary key value for a persistent object.
  `static Object`
  Cayenne.`pkForObject(Persistent object)`
  Returns a primary key value for a persistent object.
  `void`
  ObjectContext.`prepareForAccess(Persistent object, String property, boolean lazyFaulting)`
  A callback method that child Persistent objects are expected to call before accessing property values.
  `void`
  ObjectContext.`propertyChanged(Persistent object, String property, Object oldValue, Object newValue)`
  A callback method that child Persistent objects are expected to call from inside the setter after modifying a value of a persistent property, including "simple" and "arc" properties.
  `void`
  Persistent.`removeToManyTarget(String relationshipName, Persistent target, boolean unsetReverse)`
  Removes an object from a to-many relationship.
  `void`
  PersistentObject.`removeToManyTarget(String relName, Persistent value, boolean setReverse)`
  `abstract Object`
  Fault.`resolveFault(Persistent sourceObject, String relationshipName)`
  Returns an object for a given source object and relationship.
  `protected void`
  PersistentObject.`setReverseRelationship(String relName, Persistent val)`
  Initializes reverse relationship from object `val` to this object.
  `void`
  Persistent.`setToOneTarget(String relationshipName, Persistent value, boolean setReverse)`
  Sets to-one relationship to a new value.
  `void`
  PersistentObject.`setToOneTarget(String relationshipName, Persistent value, boolean setReverse)`
  `protected void`
  PersistentObject.`unsetReverseRelationship(String relName, Persistent val)`
  Removes current object from reverse relationship of object `val` to this object.
  `protected void`
  PersistentObject.`willConnect(String relationshipName, Persistent object)`
  Called before establishing a relationship with another object.
  Method parameters in org.apache.cayenne with type arguments of type Persistent
  Modifier and Type
  Method
  Description
  `List<? extends Persistent>`
  PersistentObject.`setToManyTarget(String relName, Collection<? extends Persistent> values, boolean setReverse)`
  Sets the relationships to the specified `Persistent` objects.
  Constructors in org.apache.cayenne with parameters of type Persistent
  Modifier
  Constructor
  Description
  ``
  `DeleteDenyException(Persistent object, String relationship, String reason)`

- ## Uses of Persistent in org.apache.cayenne.access

  Fields in org.apache.cayenne.access with type parameters of type Persistent
  Modifier and Type
  Field
  Description
  `protected Map<Object, Persistent>`
  ObjectStore.`objectMap`
  Methods in org.apache.cayenne.access with type parameters of type Persistent
  Modifier and Type
  Method
  Description
  `<T extends Persistent>
  T`
  DataContext.`localObject(T objectFromAnotherContext)`
  `<T extends Persistent>
  T`
  DataContext.`objectFromDataRow(Class<T> objectClass, DataRow dataRow)`
  Creates a Persistent from DataRow.
  Methods in org.apache.cayenne.access that return Persistent
  Modifier and Type
  Method
  Description
  `Persistent`
  DataContext.`newObject(String entityName)`
  Instantiates a new object and registers it with this context.
  `Persistent`
  DataContext.`objectFromDataRow(String entityName, DataRow dataRow)`
  Creates a Persistent from DataRow.
  Methods in org.apache.cayenne.access that return types with arguments of type Persistent
  Modifier and Type
  Method
  Description
  `Map<Object, Persistent>`
  DefaultObjectMapRetainStrategy.`createObjectMap()`
  `Map<Object, Persistent>`
  ObjectMapRetainStrategy.`createObjectMap()`
  `Iterator<Persistent>`
  ObjectStore.`getObjectIterator()`
  Returns an iterator over the registered objects.
  `List<Persistent>`
  ObjectStore.`objectsInState(int state)`
  Return a subset of registered objects that are in a certain persistence state.
  Methods in org.apache.cayenne.access with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `DataRow`
  DataContext.`currentSnapshot(Persistent object)`
  Returns a `DataRow` reflecting current, possibly uncommitted, object state.
  `void`
  DataContextDelegate.`finishedMergeChanges(Persistent object)`
  Called after a successful merging of external changes to an object.
  `void`
  DataContextDelegate.`finishedProcessDelete(Persistent object)`
  Called after a successful processing of externally deleted object.
  `void`
  DataContext.`prepareForAccess(Persistent object, String property, boolean lazyFaulting)`
  `void`
  DataContext.`propertyChanged(Persistent object, String property, Object oldValue, Object newValue)`
  `Object`
  AttributeFault.`resolveFault(Persistent sourceObject, String attributeName)`
  `Object`
  ToManyListFault.`resolveFault(Persistent sourceObject, String relationshipName)`
  Resolves this fault to a List of objects.
  `Object`
  ToManyMapFault.`resolveFault(Persistent sourceObject, String relationshipName)`
  `Object`
  ToManySetFault.`resolveFault(Persistent sourceObject, String relationshipName)`
  `Object`
  ToOneFault.`resolveFault(Persistent sourceObject, String relationshipName)`
  Resolves this fault to a Persistent.
  `boolean`
  DataContextDelegate.`shouldMergeChanges(Persistent object, DataRow snapshotInStore)`
  Invoked by parent DataContext whenever an object change is detected.
  `boolean`
  DataContextDelegate.`shouldProcessDelete(Persistent object)`
  Invoked by ObjectStore whenever it is detected that a database row was deleted for object.
  Constructors in org.apache.cayenne.access with parameters of type Persistent
  Modifier
  Constructor
  Description
  ``
  `ToManyList(Persistent source, String relationship)`
  Creates ToManyList.
  `protected`
  `ToManySet(Persistent relationshipOwner, String relationshipName)`
  Constructor parameters in org.apache.cayenne.access with type arguments of type Persistent
  Modifier
  Constructor
  Description
  ``
  `NoSyncObjectStore(DataRowStore dataRowCache, Map<Object, Persistent> objectMap)`
  ``
  `ObjectStore(DataRowStore dataRowCache, Map<Object, Persistent> objectMap)`
  Creates an ObjectStore with `DataRowStore` and a map to use for storing registered objects.

- ## Uses of Persistent in org.apache.cayenne.access.flush.operation

  Fields in org.apache.cayenne.access.flush.operation declared as Persistent
  Modifier and Type
  Field
  Description
  `protected final Persistent`
  BaseDbRowOp.`object`
  Methods in org.apache.cayenne.access.flush.operation that return Persistent
  Modifier and Type
  Method
  Description
  `Persistent`
  BaseDbRowOp.`getObject()`
  `Persistent`
  DbRowOp.`getObject()`
  Methods in org.apache.cayenne.access.flush.operation with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `DeleteDbRowOp`
  ConditionalSoftDeleteDbRowOpFactory.`createOp(Persistent object, DbEntity entity, ObjectId id)`
  `DeleteDbRowOp`
  DeleteDbRowOpFactory.`createOp(Persistent object, DbEntity entity, ObjectId id)`
  Creates a delete op for a given object and target table.
  `DeleteDbRowOp`
  HardDeleteDbRowOpFactory.`createOp(Persistent object, DbEntity entity, ObjectId id)`
  `static DbRowOpType`
  DbRowOpType.`forObject(Persistent object)`
  Constructors in org.apache.cayenne.access.flush.operation with parameters of type Persistent
  Modifier
  Constructor
  Description
  `protected`
  `BaseDbRowOp(Persistent object, DbEntity entity, ObjectId id)`
  ``
  `DeleteDbRowOp(Persistent object, DbEntity entity, ObjectId id)`
  ``
  `InsertDbRowOp(Persistent object, DbEntity entity, ObjectId id)`
  ``
  `SoftDeleteDbRowOp(Persistent object, DbEntity entity, ObjectId id, DbAttribute deletedAttribute)`
  ``
  `UpdateDbRowOp(Persistent object, DbEntity entity, ObjectId id)`

- ## Uses of Persistent in org.apache.cayenne.ashwood

  Methods in org.apache.cayenne.ashwood that return Persistent
  Modifier and Type
  Method
  Description
  `protected Persistent`
  AshwoodEntitySorter.`findReflexiveMaster(Persistent object, ObjRelationship toOneRel, String targetEntityName)`
  Methods in org.apache.cayenne.ashwood with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `protected Persistent`
  AshwoodEntitySorter.`findReflexiveMaster(Persistent object, ObjRelationship toOneRel, String targetEntityName)`
  Method parameters in org.apache.cayenne.ashwood with type arguments of type Persistent
  Modifier and Type
  Method
  Description
  `protected <E> Digraph<E,Boolean>`
  AshwoodEntitySorter.`buildDigraph(ObjEntity objEntity, List<E> objects, Function<E, Persistent> converter)`
  `protected <E> void`
  AshwoodEntitySorter.`sortObjectsForEntity(ObjEntity objEntity, List<E> objects, boolean deleteOrder, Function<E, Persistent> converter)`

- ## Uses of Persistent in org.apache.cayenne.exp

  Methods in org.apache.cayenne.exp with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `static Expression`
  ExpressionFactory.`matchAnyExp(Persistent... objects)`
  Creates an expression that matches any of the objects contained in the `objects` array
  `static Expression`
  ExpressionFactory.`matchExp(Persistent object)`
  Creates an expression that matches the primary key of object in `ObjectId`'s `IdSnapshot` for the argument `object`.
  Method parameters in org.apache.cayenne.exp with type arguments of type Persistent
  Modifier and Type
  Method
  Description
  `static Expression`
  ExpressionFactory.`matchAnyExp(List<? extends Persistent> objects)`
  Creates an expression that matches any of the objects contained in the list `objects`

- ## Uses of Persistent in org.apache.cayenne.exp.property

  Classes in org.apache.cayenne.exp.property with type parameters of type Persistent
  Modifier and Type
  Class
  Description
  `class`
  `CollectionProperty<V extends Persistent, E extends Collection<V>>`
  Base class for `ListProperty` and `SetProperty`
  `class`
  `EntityProperty<E extends Persistent>`
  Property that represents to-one relationships.
  `class`
  `ListProperty<V extends Persistent>`
  Property that represents to-many relationship mapped on `List`.
  `class`
  `MapProperty<K, V extends Persistent>`
  Property that represents to-many relationship mapped on `Map`.
  `class`
  `SelfProperty<E extends Persistent>`
  Property that represents root entity
  `class`
  `SetProperty<V extends Persistent>`
  Property that represents to-many relationship mapped on `Set`.
  Methods in org.apache.cayenne.exp.property with type parameters of type Persistent
  Modifier and Type
  Method
  Description
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createEntity(String name, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createEntity(String name, Expression expression, Class<T> entityType)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createEntity(Expression expression, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createEntity(CayennePath path, Class<T> type)`
  Create entity property
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createEntity(CayennePath path, Expression expression, Class<T> entityType)`
  Create entity property
  `static <T extends Persistent>
  ListProperty<T>`
  PropertyFactory.`createList(String name, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  PropertyFactory.`createList(String name, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  PropertyFactory.`createList(CayennePath path, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <T extends Persistent>
  ListProperty<T>`
  PropertyFactory.`createList(CayennePath path, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on list property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  PropertyFactory.`createMap(String name, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  PropertyFactory.`createMap(String name, Expression expression, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  PropertyFactory.`createMap(CayennePath path, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <K, V extends Persistent>
  MapProperty<K,V>`
  PropertyFactory.`createMap(CayennePath path, Expression expression, Class<K> keyType, Class<V> entityType)`
  Create to-many relationship mapped on map property
  `static <T extends Persistent>
  SelfProperty<T>`
  PropertyFactory.`createSelf(Class<T> type)`
  Self property allows to create column queries that return full objects along with custom column set.
  `static <T extends Persistent>
  EntityProperty<T>`
  PropertyFactory.`createSelf(Expression expression, Class<T> type)`
  Self property allows to create column queries that return full objects along with custom column set.
  `static <T extends Persistent>
  SetProperty<T>`
  PropertyFactory.`createSet(String name, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  PropertyFactory.`createSet(String name, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  PropertyFactory.`createSet(CayennePath path, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `static <T extends Persistent>
  SetProperty<T>`
  PropertyFactory.`createSet(CayennePath path, Expression expression, Class<T> entityType)`
  Create to-many relationship mapped on set property
  `default <T extends Persistent>
  EntityProperty<T>`
  RelationshipProperty.`dot(EntityProperty<T> property)`
  Constructs a new property path by appending the argument to the existing property separated by a dot.
  `default <T extends Persistent>
  ListProperty<T>`
  RelationshipProperty.`dot(ListProperty<T> property)`
  Constructs a new property path by appending the argument to the existing property separated by a dot.
  `default <K, V extends Persistent>
  MapProperty<K,V>`
  RelationshipProperty.`dot(MapProperty<K,V> property)`
  Constructs a new property path by appending the argument to the existing property separated by a dot.
  `default <T extends Persistent>
  SetProperty<T>`
  RelationshipProperty.`dot(SetProperty<T> property)`
  Constructs a new property path by appending the argument to the existing property separated by a dot.
  Methods in org.apache.cayenne.exp.property with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `Expression`
  CollectionProperty.`contains(V firstValue, V... moreValues)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  in favour of `CollectionProperty.containsValues(V...)`
  `final Expression`
  MapProperty.`contains(V firstValue, V... moreValues)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  in favour of `MapProperty.containsValues(V...)`
  `final Expression`
  CollectionProperty.`containsValues(V... values)`
  `final Expression`
  MapProperty.`containsValues(V... values)`
  `final Expression`
  CollectionProperty.`notContains(V firstValue, V... moreValues)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  in favour of `CollectionProperty.notContainsValues(V...)`
  `final Expression`
  MapProperty.`notContains(V firstValue, V... moreValues)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  in favour of `MapProperty.notContainsValues(V...)`
  `final Expression`
  CollectionProperty.`notContainsValues(V... values)`
  `final Expression`
  MapProperty.`notContainsValues(V... values)`

- ## Uses of Persistent in org.apache.cayenne.graph

  Methods in org.apache.cayenne.graph that return Persistent
  Modifier and Type
  Method
  Description
  `protected Persistent`
  ChildDiffLoader.`findObject(Object nodeId)`
  `protected Persistent`
  ChildDiffLoader.`findObjectInCollection(Object nodeId, Object toManyHolder)`

- ## Uses of Persistent in org.apache.cayenne.map

  Methods in org.apache.cayenne.map with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `ObjEntity`
  DataMap.`getObjEntity(Persistent object)`
  `ObjEntity`
  EntityResolver.`getObjEntity(Persistent object)`
  `ObjEntity`
  MappingNamespace.`getObjEntity(Persistent object)`

- ## Uses of Persistent in org.apache.cayenne.query

  Constructors in org.apache.cayenne.query with parameters of type Persistent
  Modifier
  Constructor
  Description
  ``
  `RefreshQuery(Persistent object)`
  Creates a RefreshQuery that refreshes a single object, including invalidation of its relationships.

- ## Uses of Persistent in org.apache.cayenne.reflect

  Methods in org.apache.cayenne.reflect with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `void`
  LifecycleCallbackRegistry.`performCallbacks(LifecycleEvent type, Persistent object)`
  Invokes callbacks of a specific type for a given entity object.

- ## Uses of Persistent in org.apache.cayenne.util

  Fields in org.apache.cayenne.util declared as Persistent
  Modifier and Type
  Field
  Description
  `protected Persistent`
  RelationshipFault.`relationshipOwner`
  Methods in org.apache.cayenne.util with type parameters of type Persistent
  Modifier and Type
  Method
  Description
  `<T extends Persistent>
  T`
  DeepMergeOperation.`merge(T peerInParentContext)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `<T extends Persistent>
  T`
  ShallowMergeOperation.`merge(T peerInParentContext)`
  Methods in org.apache.cayenne.util that return Persistent
  Modifier and Type
  Method
  Description
  `Persistent`
  RelationshipFault.`getRelationshipOwner()`
  Methods in org.apache.cayenne.util with parameters of type Persistent
  Modifier and Type
  Method
  Description
  `protected void`
  PersistentObjectHolder.`connect(Persistent persistent)`
  Returns an object that should be stored as a value in this ValueHolder, ensuring that it is registered with the same context.
  Constructors in org.apache.cayenne.util with parameters of type Persistent
  Modifier
  Constructor
  Description
  ``
  `PersistentObjectHolder(Persistent relationshipOwner, String relationshipName)`
  ``
  `PersistentObjectList(Persistent relationshipOwner, String relationshipName)`
  Creates PersistentObjectList initializing it with list owner persistent object and relationship name that this list maps to.
  ``
  `PersistentObjectMap(Persistent relationshipOwner, String relationshipName, Accessor mapKeyAccessor)`
  Creates PersistentObjectList initializing it with list owner persistent object and relationship name that this list maps to.
  ``
  `PersistentObjectSet(Persistent relationshipOwner, String relationshipName)`
  ``
  `RelationshipFault(Persistent relationshipOwner, String relationshipName)`