Methods for the implementation of the Session interface to implement.
| Type | Name and description |
|---|---|
void |
addPendingInsert(PendingInsert insert)Adds a pending insert operation |
void |
addPendingUpdate(PendingUpdate update)Adds a pending update operation |
void |
addPostFlushOperation(java.lang.Runnable runnable)Adds an operation to be executed after a flush |
void |
cacheCollection(PersistentEntity entity, java.io.Serializable key, java.util.Collection collection, java.lang.String name)Caches a collection |
void |
cacheEntry(PersistentEntity entity, java.io.Serializable key, T entry)Caches a native entry |
void |
cacheInstance(java.lang.Class type, java.io.Serializable key, java.lang.Object instance)Caches an instance |
EntityAccess |
createEntityAccess(PersistentEntity entity, java.lang.Object instance) |
java.util.Collection |
getCachedCollection(PersistentEntity entity, java.io.Serializable key, java.lang.String name)Obtains a cached collection |
T |
getCachedEntry(PersistentEntity entity, java.io.Serializable key)Obtains a cached entry |
T |
getCachedEntry(PersistentEntity entity, java.io.Serializable key, boolean forDirtyCheck)Obtains a cached entry |
java.lang.Object |
getCachedInstance(java.lang.Class type, java.io.Serializable key)Get the cached instance if it exists. |
java.util.Map<PersistentEntity, java.util.Collection<PendingDelete>> |
getPendingDeletes()@return The pending deletes |
java.util.Map<PersistentEntity, java.util.Collection<PendingInsert>> |
getPendingInserts()@return The pending insert operations |
java.util.Map<PersistentEntity, java.util.Collection<PendingUpdate>> |
getPendingUpdates()@return The pending updates |
boolean |
isCached(java.lang.Class type, java.io.Serializable key)Whether an object with the specified key is contained within the first level cache. |
boolean |
isPendingAlready(T obj)@param obj Whether the given object is already pending |
boolean |
isStateless()@return Whether the session is stateless |
boolean |
isStateless(PersistentEntity entity)@return Whether the session is stateless |
void |
registerPending(T obj)Register a pending object |
Adds a pending insert operation
insert - The pending insert operationAdds a pending update operation
update - The pending update operationAdds an operation to be executed after a flush
runnable - The runnableCaches a collection
entity - The entitykey - The keycollection - The collectionname - The name of the collectionCaches a native entry
entity - The entitykey - The keyentry - The native entryCaches an instance
type - The typekey - The keyinstance - The instanceObtains a cached collection
entity - The entitykey - The keyname - The nameObtains a cached entry
entity - The entitykey - The keyObtains a cached entry
entity - The entitykey - The keyforDirtyCheck - Whether to obtain for purposes for dirty checkingGet the cached instance if it exists.
type - the object typekey - the object keynull
Whether an object with the specified key is contained within the first level cache.
type - the object typekey - The key to checktrue if it is
obj - Whether the given object is already pending
Register a pending object
obj - The object to register