Interface ObjectStore
- All Known Implementing Classes:
DataContextObjectStore
public interface ObjectStore
A registry of persistent objects managed by an
ObjectContext, keyed by ObjectId. Also tracks the
committed state of those objects as DataRow snapshots. Users rarely need to access the store directly, as
ObjectContext serves as a facade for most of its operations.- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns a committed snapshot of an object with the id from the cache, or null if it is not cached.Returns a registered object for the id, or null if no such object is registered.getSnapshot(ObjectId oid) Returns a committed snapshot of an object with the id, fetching it from the database if needed.booleanReturns true if any registered objects have uncommitted changes.objectsInState(int state) Returns registered objects in a givenPersistenceState.Returns a copy of the collection of all registered objects.voidregisterObject(ObjectId id, Persistent nodeObject) Registers an object under the id.Unregisters an object with the id, forgetting any information associated with it.
-
Method Details
-
getObject
Returns a registered object for the id, or null if no such object is registered. -
registerObject
Registers an object under the id. -
unregisterObject
Unregisters an object with the id, forgetting any information associated with it. Returns the unregistered object, or null if none was registered. -
registeredObjects
Collection<Persistent> registeredObjects()Returns a copy of the collection of all registered objects. -
objectsInState
Returns registered objects in a givenPersistenceState. -
hasChanges
boolean hasChanges()Returns true if any registered objects have uncommitted changes. -
getCachedSnapshot
Returns a committed snapshot of an object with the id from the cache, or null if it is not cached. UnlikegetSnapshot(ObjectId), never fetches from the database. -
getSnapshot
-