Uses of Interface
org.apache.cayenne.Persistent
Package
Description
Contains persistence APIs directly accessible by users.
Contains classes that make up Cayenne ORM stack.
Cayenne data expression classes.
Property API
Contains generic graph management tools used in Cayenne.
Contains O/R mapping classes that store relational database
metadata information and map it to Java classes.
Defines standard queries supported by Cayenne and extension mechanism to create
custom queries.
General utility classes.
-
Uses of Persistent in org.apache.cayenne
Modifier and TypeInterfaceDescriptioninterface
Defines basic methods for a persistent object in Cayenne.Modifier and TypeClassDescriptionclass
Base implementation ofDataObject
, have no assumption about how data is actually stored.class
Implementation ofDataObject
that usesMap
to store object fields.class
This data object likeCayenneDataObject
usesMap
to store generic attributes, only difference is that this Map will be created lazily at first write, thus reducing memory penalty if possible.class
A convenience base superclass for concrete Persistent objects.Modifier and TypeMethodDescription<T extends Persistent>
TBaseContext.localObject
(T objectFromAnotherContext) <T extends Persistent>
TObjectContext.localObject
(T objectFromAnotherContext) Returns a local copy of 'objectFromAnotherContext' object.Modifier and TypeMethodDescriptionCayenne.compoundPKForObject
(Persistent dataObject) 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 properyName) Returns property descriptor for specified property.static int
Cayenne.intPKForObject
(Persistent dataObject) Returns an int primary key value for a persistent object.static long
Cayenne.longPKForObject
(Persistent dataObject) Returns an int primary key value for a persistent object.static Object
Cayenne.pkForObject
(Persistent dataObject) Returns a primary key value for a persistent object.void
BaseContext.prepareForAccess
(Persistent object, String property, boolean lazyFaulting) 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
BaseContext.propertyChanged
(Persistent object, String property, Object oldValue, Object newValue) 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.abstract Object
Fault.resolveFault
(Persistent sourceObject, String relationshipName) Returns an object for a given source object and relationship.protected void
BaseDataObject.willConnect
(String relationshipName, Persistent object) Called before establishing a relationship with another object.ModifierConstructorDescriptionDeleteDenyException
(Persistent object, String relationship, String reason) -
Uses of Persistent in org.apache.cayenne.access
Modifier and TypeMethodDescription<T extends Persistent>
TDataContext.objectFromDataRow
(Class<T> objectClass, DataRow dataRow) Creates a DataObject from DataRow.Modifier and TypeMethodDescriptionInstantiates a new object and registers it with this context.Modifier and TypeMethodDescriptionDefaultObjectMapRetainStrategy.createObjectMap()
ObjectMapRetainStrategy.createObjectMap()
ObjectStore.getObjectIterator()
Returns an iterator over the registered objects.ObjectStore.objectsInState
(int state) Return a subset of registered objects that are in a certain persistence state.Modifier and TypeMethodDescriptionDataContext.currentSnapshot
(Persistent object) Returns a DataRow reflecting current, possibly uncommitted, object state.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 DataObject.ModifierConstructorDescriptionToManyList
(Persistent source, String relationship) Creates ToManyList.protected
ToManySet
(Persistent relationshipOwner, String relationshipName) ModifierConstructorDescriptionNoSyncObjectStore
(DataRowStore dataRowCache, Map<Object, Persistent> objectMap) ObjectStore
(DataRowStore dataRowCache, Map<Object, Persistent> objectMap) Creates an ObjectStore withDataRowStore
and a map to use for storing registered objects. -
Uses of Persistent in org.apache.cayenne.access.flush.operation
ModifierConstructorDescriptionprotected
BaseDbRowOp
(Persistent object, DbEntity entity, ObjectId id) DeleteDbRowOp
(Persistent object, DbEntity entity, ObjectId id) InsertDbRowOp
(Persistent object, DbEntity entity, ObjectId id) UpdateDbRowOp
(Persistent object, DbEntity entity, ObjectId id) -
Uses of Persistent in org.apache.cayenne.ashwood
Modifier and TypeMethodDescriptionprotected Persistent
AshwoodEntitySorter.findReflexiveMaster
(Persistent object, ObjRelationship toOneRel, String targetEntityName) Modifier and TypeMethodDescriptionprotected Persistent
AshwoodEntitySorter.findReflexiveMaster
(Persistent object, ObjRelationship toOneRel, String targetEntityName) Modifier and TypeMethodDescriptionAshwoodEntitySorter.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
Modifier and TypeMethodDescriptionstatic <T extends Persistent>
Property<T> Property.createSelf
(Class<? super T> type) Deprecated.Creates "self" Property for persistent class.<T extends Persistent>
Property<T> Deprecated.Create new "flat" property for toMany relationship.Modifier and TypeMethodDescriptionstatic Expression
ExpressionFactory.matchAnyExp
(Persistent... objects) Creates an expression that matches any of the objects contained in theobjects
arraystatic Expression
ExpressionFactory.matchExp
(Persistent object) Creates an expression that matches the primary key of object inObjectId
'sIdSnapshot
for the argumentobject
.Modifier and TypeMethodDescriptionstatic Expression
ExpressionFactory.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
Modifier and TypeClassDescriptionclass
CollectionProperty<V extends Persistent,
E extends Collection<V>> Base class forListProperty
andSetProperty
class
EntityProperty<E extends Persistent>
Property that represents to-one relationships.class
ListProperty<V extends Persistent>
Property that represents to-many relationship mapped onList
.class
MapProperty<K,
V extends Persistent> Property that represents to-many relationship mapped onMap
.class
SetProperty<V extends Persistent>
Property that represents to-many relationship mapped onSet
.Modifier 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>
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 <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 <T extends Persistent>
EntityProperty<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> 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 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.Modifier and TypeMethodDescriptionfinal Expression
final Expression
final Expression
CollectionProperty.notContains
(V firstValue, V... moreValues) final Expression
MapProperty.notContains
(V firstValue, V... moreValues) -
Uses of Persistent in org.apache.cayenne.graph
Modifier and TypeMethodDescriptionprotected Persistent
ChildDiffLoader.findObject
(Object nodeId) protected Persistent
ChildDiffLoader.findObjectInCollection
(Object nodeId, Object toManyHolder) -
Uses of Persistent in org.apache.cayenne.map
Modifier and TypeMethodDescriptionDataMap.getObjEntity
(Persistent object) EntityResolver.getObjEntity
(Persistent object) MappingNamespace.getObjEntity
(Persistent object) -
Uses of Persistent in org.apache.cayenne.query
ModifierConstructorDescriptionRefreshQuery
(Persistent object) Creates a RefreshQuery that refreshes a single object, including invalidation of its relationships. -
Uses of Persistent in org.apache.cayenne.reflect
Modifier and TypeMethodDescriptionvoid
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
Modifier and TypeMethodDescription<T extends Persistent>
TDeepMergeOperation.merge
(T peerInParentContext) <T extends Persistent>
TShallowMergeOperation.merge
(T peerInParentContext) Modifier and TypeMethodDescriptionprotected 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.protected void
ObjectContextGraphAction.handleArcPropertyChange
(Persistent object, ArcProperty property, Object oldValue, Object newValue) void
ObjectContextGraphAction.handlePropertyChange
(Persistent object, String propertyName, Object oldValue, Object newValue) Handles property change in a Persistent object, routing to eitherObjectContextGraphAction.handleArcPropertyChange(Persistent, ArcProperty, Object, Object)
orObjectContextGraphAction.handleSimplePropertyChange(Persistent, String, Object, Object)
.protected void
ObjectContextGraphAction.handleSimplePropertyChange
(Persistent object, String propertyName, Object oldValue, Object newValue) protected boolean
ObjectContextGraphAction.markAsDirty
(Persistent object) Changes object state to MODIFIED if needed, returning true if the change has occurred, false if not.ModifierConstructorDescriptionPersistentObjectHolder
(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)