abstract
Transaction
|
beginTransaction()
Begin a unit of work and return the associated Transaction object.
|
abstract
Session.LockRequest
|
buildLockRequest(LockOptions lockOptions)
Build a LockRequest that specifies the LockMode, pessimistic lock timeout and lock scope.
|
abstract
void
|
cancelQuery()
Cancel the execution of the current query.
|
abstract
void
|
clear()
Completely clear the session.
|
abstract
Connection
|
close()
End the session by releasing the JDBC connection and cleaning up.
|
abstract
Connection
|
connection()
This method is deprecated.
(scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use
doWork(Work) ; for opening a 'temporary Session' use (TBD).
|
abstract
boolean
|
contains(Object object)
Check if this instance is associated with this Session.
|
abstract
Criteria
|
createCriteria(String entityName)
Create a new Criteria instance, for the given entity name.
|
abstract
Criteria
|
createCriteria(String entityName, String alias)
Create a new Criteria instance, for the given entity name,
with the given alias.
|
abstract
Criteria
|
createCriteria(Class persistentClass)
Create a new Criteria instance, for the given entity class,
or a superclass of an entity class.
|
abstract
Criteria
|
createCriteria(Class persistentClass, String alias)
Create a new Criteria instance, for the given entity class,
or a superclass of an entity class, with the given alias.
|
abstract
Query
|
createFilter(Object collection, String queryString)
Create a new instance of Query for the given collection and filter string.
|
abstract
Query
|
createQuery(String queryString)
Create a new instance of Query for the given HQL query string.
|
abstract
SQLQuery
|
createSQLQuery(String queryString)
Create a new instance of SQLQuery for the given SQL query string.
|
abstract
void
|
delete(String entityName, Object object)
Remove a persistent instance from the datastore.
|
abstract
void
|
delete(Object object)
Remove a persistent instance from the datastore.
|
abstract
void
|
disableFetchProfile(String name)
Disable a particular fetch profile on this session.
|
abstract
void
|
disableFilter(String filterName)
Disable the named filter for the current session.
|
abstract
Connection
|
disconnect()
Disconnect the Session from the current JDBC connection.
|
abstract
void
|
doWork(Work work)
Controller for allowing users to perform JDBC related work using the Connection
managed by this Session.
|
abstract
void
|
enableFetchProfile(String name)
Enable a particular fetch profile on this session.
|
abstract
Filter
|
enableFilter(String filterName)
Enable the named filter for this current session.
|
abstract
void
|
evict(Object object)
Remove this instance from the session cache.
|
abstract
void
|
flush()
Force this session to flush.
|
abstract
Object
|
get(String entityName, Serializable id, LockMode lockMode)
This method is deprecated.
LockMode parameter should be replaced with LockOptions
|
abstract
Object
|
get(Class clazz, Serializable id, LockOptions lockOptions)
Return the persistent instance of the given entity class with the given identifier,
or null if there is no such persistent instance.
|
abstract
Object
|
get(Class clazz, Serializable id, LockMode lockMode)
This method is deprecated.
LockMode parameter should be replaced with LockOptions
|
abstract
Object
|
get(String entityName, Serializable id)
Return the persistent instance of the given named entity with the given identifier,
or null if there is no such persistent instance.
|
abstract
Object
|
get(String entityName, Serializable id, LockOptions lockOptions)
Return the persistent instance of the given entity class with the given identifier,
or null if there is no such persistent instance.
|
abstract
Object
|
get(Class clazz, Serializable id)
Return the persistent instance of the given entity class with the given identifier,
or null if there is no such persistent instance.
|
abstract
CacheMode
|
getCacheMode()
Get the current cache mode.
|
abstract
LockMode
|
getCurrentLockMode(Object object)
Determine the current lock mode of the given object.
|
abstract
Filter
|
getEnabledFilter(String filterName)
Retrieve a currently enabled filter by name.
|
abstract
EntityMode
|
getEntityMode()
Retrieve the entity mode in effect for this session.
|
abstract
String
|
getEntityName(Object object)
Return the entity name for a persistent entity
|
abstract
FlushMode
|
getFlushMode()
Get the current flush mode for this session.
|
abstract
Serializable
|
getIdentifier(Object object)
Return the identifier value of the given entity as associated with this
session.
|
abstract
LobHelper
|
getLobHelper()
Retrieve this session's helper/delegate for creating LOB instances.
|
abstract
Query
|
getNamedQuery(String queryName)
Obtain an instance of Query for a named query string defined in the
mapping file.
|
abstract
Session
|
getSession(EntityMode entityMode)
Starts a new Session with the given entity mode in effect.
|
abstract
SessionFactory
|
getSessionFactory()
Get the session factory which created this session.
|
abstract
SessionStatistics
|
getStatistics()
Get the statistics for this session.
|
abstract
Transaction
|
getTransaction()
Get the Transaction instance associated with this session.
|
abstract
TypeHelper
|
getTypeHelper()
|
abstract
boolean
|
isConnected()
Check if the session is currently connected.
|
abstract
boolean
|
isDefaultReadOnly()
Will entities and proxies that are loaded into this session be made
read-only by default?
To determine the read-only/modifiable setting for a particular entity
or proxy:
|
abstract
boolean
|
isDirty()
Does this session contain any changes which must be synchronized with
the database? In other words, would any DML operations be executed if
we flushed this session?
|
abstract
boolean
|
isFetchProfileEnabled(String name)
Is a particular fetch profile enabled on this session?
|
abstract
boolean
|
isOpen()
Check if the session is still open.
|
abstract
boolean
|
isReadOnly(Object entityOrProxy)
Is the specified entity or proxy read-only?
To get the default read-only/modifiable setting used for
entities and proxies that are loaded into the session:
|
abstract
void
|
load(Object object, Serializable id)
Read the persistent state associated with the given identifier into the given transient
instance.
|
abstract
Object
|
load(Class theClass, Serializable id, LockMode lockMode)
This method is deprecated.
LockMode parameter should be replaced with LockOptions
|
abstract
Object
|
load(Class theClass, Serializable id)
Return the persistent instance of the given entity class with the given identifier,
assuming that the instance exists.
|
abstract
Object
|
load(String entityName, Serializable id)
Return the persistent instance of the given entity class with the given identifier,
assuming that the instance exists.
|
abstract
Object
|
load(String entityName, Serializable id, LockOptions lockOptions)
Return the persistent instance of the given entity class with the given identifier,
obtaining the specified lock mode, assuming the instance exists.
|
abstract
Object
|
load(String entityName, Serializable id, LockMode lockMode)
This method is deprecated.
LockMode parameter should be replaced with LockOptions
|
abstract
Object
|
load(Class theClass, Serializable id, LockOptions lockOptions)
Return the persistent instance of the given entity class with the given identifier,
obtaining the specified lock mode, assuming the instance exists.
|
abstract
void
|
lock(String entityName, Object object, LockMode lockMode)
This method is deprecated.
instead call buildLockRequest(LockMode).lock(entityName, object)
|
abstract
void
|
lock(Object object, LockMode lockMode)
This method is deprecated.
instead call buildLockRequest(LockMode).lock(object)
|
abstract
Object
|
merge(Object object)
Copy the state of the given object onto the persistent object with the same
identifier.
|
abstract
Object
|
merge(String entityName, Object object)
Copy the state of the given object onto the persistent object with the same
identifier.
|
abstract
void
|
persist(Object object)
Make a transient instance persistent.
|
abstract
void
|
persist(String entityName, Object object)
Make a transient instance persistent.
|
abstract
void
|
reconnect()
This method is deprecated.
Manual reconnection is only needed in the case of
application-supplied connections, in which case the
reconnect(java.sql.Connection) for should be used.
|
abstract
void
|
reconnect(Connection connection)
Reconnect to the given JDBC connection.
|
abstract
void
|
refresh(Object object, LockMode lockMode)
This method is deprecated.
LockMode parameter should be replaced with LockOptions
|
abstract
void
|
refresh(Object object, LockOptions lockOptions)
Re-read the state of the given instance from the underlying database, with
the given LockMode.
|
abstract
void
|
refresh(Object object)
Re-read the state of the given instance from the underlying database.
|
abstract
void
|
replicate(String entityName, Object object, ReplicationMode replicationMode)
Persist the state of the given detached instance, reusing the current
identifier value.
|
abstract
void
|
replicate(Object object, ReplicationMode replicationMode)
Persist the state of the given detached instance, reusing the current
identifier value.
|
abstract
Serializable
|
save(String entityName, Object object)
Persist the given transient instance, first assigning a generated identifier.
|
abstract
Serializable
|
save(Object object)
Persist the given transient instance, first assigning a generated identifier.
|
abstract
void
|
saveOrUpdate(Object object)
Either save(Object) or update(Object) the given
instance, depending upon resolution of the unsaved-value checks (see the
manual for discussion of unsaved-value checking).
|
abstract
void
|
saveOrUpdate(String entityName, Object object)
|
abstract
void
|
setCacheMode(CacheMode cacheMode)
Set the cache mode.
|
abstract
void
|
setDefaultReadOnly(boolean readOnly)
Change the default for entities and proxies loaded into this session
from modifiable to read-only mode, or from modifiable to read-only mode.
|
abstract
void
|
setFlushMode(FlushMode flushMode)
Set the flush mode for this session.
|
abstract
void
|
setReadOnly(Object entityOrProxy, boolean readOnly)
Set an unmodified persistent object to read-only mode, or a read-only
object to modifiable mode.
|
abstract
void
|
update(Object object)
Update the persistent instance with the identifier of the given detached
instance.
|
abstract
void
|
update(String entityName, Object object)
Update the persistent instance with the identifier of the given detached
instance.
|