Uses of Interface
org.apache.cayenne.Persistent
Packages that use Persistent
Package
Description
Property API
-
Uses of Persistent in org.apache.cayenne
Subinterfaces of Persistent in org.apache.cayenneModifier and TypeInterfaceDescriptioninterfaceDeprecated, for removal: This API element is subject to removal in a future version.Classes in org.apache.cayenne that implement PersistentModifier and TypeClassDescriptionclassDeprecated, for removal: This API element is subject to removal in a future version.usePersistentObjectdirectlyclassImplementation ofPersistentthat usesMapto store object fields.classThis data object likeGenericPersistentObjectusesMapto store generic attributes, only difference is that this Map will be created lazily at first write, thus reducing memory penalty if possible.classBase implementation ofPersistent, have no assumption about how data is actually stored.Fields in org.apache.cayenne declared as PersistentMethods in org.apache.cayenne with type parameters of type PersistentModifier and TypeMethodDescription<T extends Persistent>
voidObjectContext.deleteObjects(T... objects) Schedules deletion of one or more persistent objects.<T extends Persistent>
voidObjectContext.invalidateObjects(T... objects) Invalidates one or more persistent objects.<T extends Persistent>
TObjectContext.localObject(T objectFromAnotherContext) Returns a local copy of 'objectFromAnotherContext' object.default <T extends Persistent>
TCreates a new persistent object of a given class scheduled to be inserted to the database on next commit.static <T extends Persistent>
TCayenne.objectForPK(ObjectContext context, Class<T> persistentObjectClass, int pk) Deprecated, for removal: This API element is subject to removal in a future version.static <T extends Persistent>
TCayenne.objectForPK(ObjectContext context, Class<T> persistentObjectClass, Object pk) Deprecated, for removal: This API element is subject to removal in a future version.static <T extends Persistent>
TCayenne.objectForPK(ObjectContext context, Class<T> persistentObjectClass, Map<String, ?> pk) Deprecated, for removal: This API element is subject to removal in a future version.default <T extends Persistent>
TObjectContext.objectForPK(Class<T> type, Object pk) Returns an object matching a single-column primary key, or null if there's no such object.default <T extends Persistent>
TObjectContext.objectForPK(Class<T> type, Map<String, ?> pk) Returns an object matching a primary key, or null if there's no such object.Methods in org.apache.cayenne that return PersistentModifier and TypeMethodDescriptionDeleteDenyException.getObject()Returns a registered object for the id, or null if no such object is registered.Creates a new persistent object of a given entity scheduled to be inserted to the database on next commit.default PersistentObjectContext.objectForPK(String entityName, Object pk) Returns an object matching a single-column primary key, or null if there's no such object.default PersistentObjectContext.objectForPK(String entityName, Map<String, ?> pk) Returns an object matching a primary key, or null if there's no such object.ObjectContext.objectForPK(ObjectId id) Returns an object matching an ObjectId, or null if there's no such object.DataChannel.onIdQuery(ObjectContext context, ObjectId id) Resolves an object by id, returning it registered with the originating context.ObjectStore.unregisterObject(ObjectId id) Unregisters an object with the id, forgetting any information associated with it.Methods in org.apache.cayenne that return types with arguments of type PersistentModifier and TypeMethodDescriptiondefault Collection<Persistent> ObjectContext.deletedObjects()Returns a collection of objects that are registered with this ObjectContext and have a state PersistenceState.DELETEDdefault Collection<Persistent> ObjectContext.modifiedObjects()Returns a collection of objects that are registered with this ObjectContext and have a state PersistenceState.MODIFIEDdefault Collection<Persistent> ObjectContext.newObjects()Returns a collection of objects that are registered with this ObjectContext and have a state PersistenceState.NEWObjectStore.objectsInState(int state) Returns registered objects in a givenPersistenceState.List<? extends Persistent> DataChannel.onRelationshipQuery(ObjectContext context, ObjectId sourceId, String relationshipName) Resolves objects related to a given object via a mapped relationship, returning them registered with the originating context.ObjectStore.registeredObjects()Returns a copy of the collection of all registered objects.List<? extends Persistent> PersistentObject.setToManyTarget(String relName, Collection<? extends Persistent> values, boolean setReverse) Sets the relationships to the specifiedPersistentobjects.ObjectContext.uncommittedObjects()Returns a collection of MODIFIED, DELETED or NEW objects.Methods in org.apache.cayenne with parameters of type PersistentModifier and TypeMethodDescriptionvoidPersistent.addToManyTarget(String relationshipName, Persistent target, boolean setReverse) Adds an object to a to-many relationship.voidPersistentObject.addToManyTarget(String relName, Persistent value, boolean setReverse) Cayenne.compoundPKForObject(Persistent object) Returns a primary key map for a persistent object.default voidObjectContext.deleteObject(Persistent object) Schedules deletion of a persistent object.<T extends Persistent>
voidObjectContext.deleteObjects(T... objects) Schedules deletion of one or more persistent objects.static ClassDescriptorCayenne.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 ObjEntityCayenne.getObjEntity(Persistent p) Returns mapped ObjEntity for object.static PropertyDescriptorCayenne.getProperty(Persistent object, String propertyName) Returns property descriptor for specified property.static intCayenne.intPKForObject(Persistent object) Returns an int primary key value for a persistent object.<T extends Persistent>
voidObjectContext.invalidateObjects(T... objects) Invalidates one or more persistent objects.static longCayenne.longPKForObject(Persistent object) Returns an int primary key value for a persistent object.static ObjectCayenne.pkForObject(Persistent object) Returns a primary key value for a persistent object.voidObjectContext.prepareForAccess(Persistent object, String property, boolean lazyFaulting) A callback method that child Persistent objects are expected to call before accessing property values.voidObjectContext.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.voidObjectContext.registerNewObject(Persistent object) Registers a transient object with the context.voidObjectStore.registerObject(ObjectId id, Persistent nodeObject) Registers an object under the id.voidPersistent.removeToManyTarget(String relationshipName, Persistent target, boolean unsetReverse) Removes an object from a to-many relationship.voidPersistentObject.removeToManyTarget(String relName, Persistent value, boolean setReverse) abstract ObjectFault.resolveFault(Persistent sourceObject, String relationshipName) Returns an object for a given source object and relationship.protected voidPersistentObject.setReverseRelationship(String relName, Persistent val) Initializes reverse relationship from objectvalto this object.voidPersistent.setToOneTarget(String relationshipName, Persistent value, boolean setReverse) Sets to-one relationship to a new value.voidPersistentObject.setToOneTarget(String relationshipName, Persistent value, boolean setReverse) protected voidPersistentObject.unsetReverseRelationship(String relName, Persistent val) Removes current object from reverse relationship of objectvalto this object.protected voidPersistentObject.willConnect(String relationshipName, Persistent object) Called before establishing a relationship with another object.Method parameters in org.apache.cayenne with type arguments of type PersistentModifier and TypeMethodDescriptiondefault voidObjectContext.deleteObjects(Collection<? extends Persistent> objects) Schedules deletion of a collection of persistent objects.voidObjectContext.invalidateObjects(Collection<? extends Persistent> objects) Invalidates a Collection of persistent objects.List<? extends Persistent> PersistentObject.setToManyTarget(String relName, Collection<? extends Persistent> values, boolean setReverse) Sets the relationships to the specifiedPersistentobjects.Constructors in org.apache.cayenne with parameters of type PersistentModifierConstructorDescriptionDeleteDenyException(Persistent object, String relationship, String reason) -
Uses of Persistent in org.apache.cayenne.access
Fields in org.apache.cayenne.access declared as PersistentFields in org.apache.cayenne.access with type parameters of type PersistentModifier and TypeFieldDescriptionprotected final Map<ObjectId, Persistent> DataContextObjectStore.objectMapMethods in org.apache.cayenne.access with type parameters of type PersistentModifier and TypeMethodDescription<T extends Persistent>
voidDataContext.deleteObjects(T... objects) final <T extends Persistent>
voidDataContext.invalidateObjects(T... objects) <T extends Persistent>
TDataContext.localObject(T objectFromAnotherContext) <T extends Persistent>
TDataContext.objectFromDataRow(Class<T> objectClass, DataRow dataRow) Creates a Persistent from DataRow.Methods in org.apache.cayenne.access that return PersistentModifier and TypeMethodDescriptionDataContext.objectForPK(ObjectId id) DataContext.objectFromDataRow(String entityName, DataRow dataRow) Creates a Persistent from DataRow.DataContextChannel.onIdQuery(ObjectContext childContext, ObjectId id) DataDomain.onIdQuery(ObjectContext context, ObjectId id) Resolves an object from the snapshot cache, or from the database if the cache lookup fails.DataContextObjectStore.unregisterObject(ObjectId id) Methods in org.apache.cayenne.access that return types with arguments of type PersistentModifier and TypeMethodDescriptionprotected Map<ObjectId, Persistent> DataContextFactory.createObjectMap()Creates a map of registered objects for a new ObjectStore, holding the objects with the kind of references selected byRuntimeProperties.OBJECT_RETAIN_STRATEGY_PROPERTY: weak (the default), soft or hard.DataContextObjectStore.getObjectIterator()Returns an iterator over the registered objects.DataContextObjectStore.objectsInState(int state) Return a subset of registered objects that are in a certain persistence state.DataContextChannel.onRelationshipQuery(ObjectContext childContext, ObjectId sourceId, String relationshipName) DataDomain.onRelationshipQuery(ObjectContext context, ObjectId sourceId, String relationshipName) Resolves a relationship from the snapshot cache, or from the database if the cache lookup fails.DataContextObjectStore.registeredObjects()DataContext.uncommittedObjects()Returns a collection of all uncommitted registered objects.Methods in org.apache.cayenne.access with parameters of type PersistentModifier and TypeMethodDescriptionDataContext.currentSnapshot(Persistent object) Returns aDataRowreflecting current, possibly uncommitted, object state.<T extends Persistent>
voidDataContext.deleteObjects(T... objects) voidDataContextDelegate.finishedMergeChanges(Persistent object) Called after a successful merging of external changes to an object.voidDataContextDelegate.finishedProcessDelete(Persistent object) Called after a successful processing of externally deleted object.final <T extends Persistent>
voidDataContext.invalidateObjects(T... objects) voidDataContext.prepareForAccess(Persistent object, String property, boolean lazyFaulting) voidDataContext.propertyChanged(Persistent object, String property, Object oldValue, Object newValue) voidDataContext.registerNewObject(Persistent object) Registers a transient object with the context, recursively registering all transient persistent objects attached to this object via relationships.voidDataContextObjectStore.registerObject(ObjectId id, Persistent nodeObject) AttributeFault.resolveFault(Persistent sourceObject, String attributeName) ToManyListFault.resolveFault(Persistent sourceObject, String relationshipName) Resolves this fault to a List of objects.ToManyMapFault.resolveFault(Persistent sourceObject, String relationshipName) ToManySetFault.resolveFault(Persistent sourceObject, String relationshipName) ToOneFault.resolveFault(Persistent sourceObject, String relationshipName) Resolves this fault to a Persistent.booleanDataContextDelegate.shouldMergeChanges(Persistent object, Map<String, Object> snapshotInStore) Invoked by parent DataContext whenever an object change is detected.booleanDataContextDelegate.shouldProcessDelete(Persistent object) Invoked by ObjectStore whenever it is detected that a database row was deleted for object.static DataRowObjectSnapshots.snapshot(DataContext context, Persistent object, long version) Returns aDataRowreflecting the current, possibly uncommitted, state of an object registered in the given context, with the given snapshot version.Method parameters in org.apache.cayenne.access with type arguments of type PersistentModifier and TypeMethodDescriptionvoidDataContext.invalidateObjects(Collection<? extends Persistent> objects) DataContext.Builder.objectMap(Map<ObjectId, Persistent> objectMap) Sets a map to store registered objects in.voidDataContextObjectStore.objectsUnregistered(Collection<? extends Persistent> objects) Evicts a collection of Persistent objects from the ObjectStore, invalidates the underlying cache snapshots.voidDataContext.unregisterObjects(Collection<? extends Persistent> objects) Unregisters a Collection of Persistent objects from the DataContext and the underlying ObjectStore.Constructors in org.apache.cayenne.access with parameters of type PersistentModifierConstructorDescriptionprotectedToManyHolder(Persistent relationshipOwner, String relationshipName) ToManyList(Persistent source, String relationship) Creates ToManyList.ToManySet(Persistent relationshipOwner, String relationshipName) Constructor parameters in org.apache.cayenne.access with type arguments of type PersistentModifierConstructorDescriptionprotectedDataContext(DataChannel channel, DataRowStore snapshotCache, Map<ObjectId, Persistent> objectMap, boolean syncWithSnapshotCache, boolean usingSharedSnapshotCache, boolean validatingObjectsOnCommit, QueryCache queryCache) Creates a DataContext and its ObjectStore as a single unit.DataContextObjectStore(DataContext context, DataRowStore dataRowCache, Map<ObjectId, Persistent> objectMap, boolean syncWithSnapshotCache) -
Uses of Persistent in org.apache.cayenne.access.flush.operation
Fields in org.apache.cayenne.access.flush.operation declared as PersistentMethods in org.apache.cayenne.access.flush.operation that return PersistentMethods in org.apache.cayenne.access.flush.operation with parameters of type PersistentModifier and TypeMethodDescriptionConditionalSoftDeleteDbRowOpFactory.createOp(Persistent object, DbEntity entity, ObjectId id) DeleteDbRowOpFactory.createOp(Persistent object, DbEntity entity, ObjectId id) Creates a delete op for a given object and target table.HardDeleteDbRowOpFactory.createOp(Persistent object, DbEntity entity, ObjectId id) static DbRowOpTypeDbRowOpType.forObject(Persistent object) Constructors in org.apache.cayenne.access.flush.operation with parameters of type PersistentModifierConstructorDescriptionprotectedBaseDbRowOp(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 PersistentModifier and TypeMethodDescriptionprotected PersistentAshwoodEntitySorter.findReflexiveMaster(Persistent object, ObjRelationship toOneRel, String targetEntityName) Methods in org.apache.cayenne.ashwood with parameters of type PersistentModifier and TypeMethodDescriptionprotected PersistentAshwoodEntitySorter.findReflexiveMaster(Persistent object, ObjRelationship toOneRel, String targetEntityName) Method parameters in org.apache.cayenne.ashwood with type arguments of type PersistentModifier and TypeMethodDescriptionAshwoodEntitySorter.buildDigraph(ObjEntity objEntity, List<E> objects, Function<E, Persistent> converter) protected <E> voidAshwoodEntitySorter.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 PersistentModifier and TypeMethodDescriptionstatic ExpressionExpressionFactory.matchAnyExp(Persistent... objects) Creates an expression that matches any of the objects contained in theobjectsarraystatic ExpressionExpressionFactory.matchExp(Persistent object) Creates an expression that matches the primary key of object inObjectId'sIdSnapshotfor the argumentobject.Method parameters in org.apache.cayenne.exp with type arguments of type PersistentModifier and TypeMethodDescriptionstatic ExpressionExpressionFactory.matchAnyExp(List<? extends Persistent> objects) Creates an expression that matches any of the objects contained in the listobjects -
Uses of Persistent in org.apache.cayenne.exp.property
Classes in org.apache.cayenne.exp.property with type parameters of type PersistentModifier and TypeClassDescriptionclassCollectionProperty<V extends Persistent, E extends Collection<V>>Base class forListPropertyandSetPropertyclassEntityProperty<E extends Persistent>Property that represents to-one relationships.classListProperty<V extends Persistent>Property that represents to-many relationship mapped onList.classMapProperty<K, V extends Persistent>Property that represents to-many relationship mapped onMap.classSelfProperty<E extends Persistent>Property that represents root entityclassSetProperty<V extends Persistent>Property that represents to-many relationship mapped onSet.Methods in org.apache.cayenne.exp.property with type parameters of type PersistentModifier and TypeMethodDescriptionstatic <T extends Persistent>
EntityProperty<T> PropertyFactory.createEntity(String name, Class<T> type) Create entity propertystatic <T extends Persistent>
EntityProperty<T> PropertyFactory.createEntity(String name, Expression expression, Class<T> entityType) Create entity propertystatic <T extends Persistent>
EntityProperty<T> PropertyFactory.createEntity(Expression expression, Class<T> type) Create entity propertystatic <T extends Persistent>
EntityProperty<T> PropertyFactory.createEntity(CayennePath path, Class<T> type) Create entity propertystatic <T extends Persistent>
EntityProperty<T> PropertyFactory.createEntity(CayennePath path, Expression expression, Class<T> entityType) Create entity propertystatic <T extends Persistent>
ListProperty<T> PropertyFactory.createList(String name, Class<T> entityType) Create to-many relationship mapped on list propertystatic <T extends Persistent>
ListProperty<T> PropertyFactory.createList(String name, Expression expression, Class<T> entityType) Create to-many relationship mapped on list propertystatic <T extends Persistent>
ListProperty<T> PropertyFactory.createList(CayennePath path, Class<T> entityType) Create to-many relationship mapped on list propertystatic <T extends Persistent>
ListProperty<T> PropertyFactory.createList(CayennePath path, Expression expression, Class<T> entityType) Create to-many relationship mapped on list propertystatic <K, V extends Persistent>
MapProperty<K, V> Create to-many relationship mapped on map propertystatic <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 propertystatic <K, V extends Persistent>
MapProperty<K, V> PropertyFactory.createMap(CayennePath path, Class<K> keyType, Class<V> entityType) Create to-many relationship mapped on map propertystatic <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 propertystatic <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) Deprecated, for removal: This API element is subject to removal in a future version.static <T extends Persistent>
SetProperty<T> Create to-many relationship mapped on set propertystatic <T extends Persistent>
SetProperty<T> PropertyFactory.createSet(String name, Expression expression, Class<T> entityType) Create to-many relationship mapped on set propertystatic <T extends Persistent>
SetProperty<T> PropertyFactory.createSet(CayennePath path, Class<T> entityType) Create to-many relationship mapped on set propertystatic <T extends Persistent>
SetProperty<T> PropertyFactory.createSet(CayennePath path, Expression expression, Class<T> entityType) Create to-many relationship mapped on set propertydefault <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 PersistentModifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.in favour ofCollectionProperty.containsValues(V...)final ExpressionDeprecated, for removal: This API element is subject to removal in a future version.in favour ofMapProperty.containsValues(V...)final ExpressionCollectionProperty.containsValues(V... values) final ExpressionMapProperty.containsValues(V... values) final ExpressionCollectionProperty.notContains(V firstValue, V... moreValues) Deprecated, for removal: This API element is subject to removal in a future version.in favour ofCollectionProperty.notContainsValues(V...)final ExpressionMapProperty.notContains(V firstValue, V... moreValues) Deprecated, for removal: This API element is subject to removal in a future version.in favour ofMapProperty.notContainsValues(V...)final ExpressionCollectionProperty.notContainsValues(V... values) final ExpressionMapProperty.notContainsValues(V... values) -
Uses of Persistent in org.apache.cayenne.graph
Methods in org.apache.cayenne.graph that return PersistentModifier and TypeMethodDescriptionprotected PersistentChildDiffLoader.findObject(ObjectId id) protected PersistentChildDiffLoader.findObjectInCollection(ObjectId id, Object toManyHolder) -
Uses of Persistent in org.apache.cayenne.map
Methods in org.apache.cayenne.map with parameters of type PersistentModifier and TypeMethodDescriptionDataMap.getObjEntity(Persistent object) EntityResolver.getObjEntity(Persistent object) MappingNamespace.getObjEntity(Persistent object) -
Uses of Persistent in org.apache.cayenne.reflect
Methods in org.apache.cayenne.reflect with parameters of type PersistentModifier and TypeMethodDescriptionvoidLifecycleCallbackRegistry.performCallbacks(LifecycleEvent type, Persistent object) Invokes callbacks of a specific type for a given entity object.
Persistentinterface directly