public interface SharedSessionContract extends Serializable
Session
and StatelessSession
.Modifier and Type | Method and Description |
---|---|
Transaction |
beginTransaction()
Begin a unit of work and return the associated
Transaction object. |
Criteria |
createCriteria(Class persistentClass)
Create
Criteria instance for the given class (entity or subclasses/implementors). |
Criteria |
createCriteria(Class persistentClass,
String alias)
Create
Criteria instance for the given class (entity or subclasses/implementors), using a specific
alias. |
Criteria |
createCriteria(String entityName)
Create
Criteria instance for the given entity name. |
Criteria |
createCriteria(String entityName,
String alias)
Create
Criteria instance for the given entity name, using a specific alias. |
Query |
createQuery(String queryString)
Create a
Query instance for the given HQL query string. |
SQLQuery |
createSQLQuery(String queryString)
Create a
SQLQuery instance for the given SQL query string. |
ProcedureCall |
createStoredProcedureCall(String procedureName)
Creates a call to a stored procedure.
|
ProcedureCall |
createStoredProcedureCall(String procedureName,
Class... resultClasses)
Creates a call to a stored procedure with specific result set entity mappings.
|
ProcedureCall |
createStoredProcedureCall(String procedureName,
String... resultSetMappings)
Creates a call to a stored procedure with specific result set entity mappings.
|
ProcedureCall |
getNamedProcedureCall(String name)
Gets a ProcedureCall based on a named template
|
Query |
getNamedQuery(String queryName)
Create a
Query instance for the named query string defined in the metadata. |
String |
getTenantIdentifier()
Obtain the tenant identifier associated with this session.
|
Transaction |
getTransaction()
Get the
Transaction instance associated with this session. |
String getTenantIdentifier()
null
Transaction beginTransaction()
Transaction
object. If a new underlying transaction is
required, begin the transaction. Otherwise continue the new work in the context of the existing underlying
transaction.getTransaction()
Transaction getTransaction()
Transaction
instance associated with this session. The concrete type of the returned
Transaction
object is determined by the hibernate.transaction_factory
property.Query getNamedQuery(String queryName)
Query
instance for the named query string defined in the metadata.queryName
- the name of a query defined externallyQuery createQuery(String queryString)
Query
instance for the given HQL query string.queryString
- The HQL querySQLQuery createSQLQuery(String queryString)
SQLQuery
instance for the given SQL query string.queryString
- The SQL queryProcedureCall getNamedProcedureCall(String name)
name
- The name given to the templateNamedStoredProcedureQuery
ProcedureCall createStoredProcedureCall(String procedureName)
procedureName
- The name of the procedure.ProcedureCall createStoredProcedureCall(String procedureName, Class... resultClasses)
procedureName
- The name of the procedure.resultClasses
- The entity(s) to map the result on to.ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings)
procedureName
- The name of the procedure.resultSetMappings
- The explicit result set mapping(s) to use for mapping the resultsCriteria createCriteria(Class persistentClass)
Criteria
instance for the given class (entity or subclasses/implementors).persistentClass
- The class, which is an entity, or has entity subclasses/implementorsCriteria createCriteria(Class persistentClass, String alias)
Criteria
instance for the given class (entity or subclasses/implementors), using a specific
alias.persistentClass
- The class, which is an entity, or has entity subclasses/implementorsalias
- The alias to useCriteria createCriteria(String entityName)
Criteria
instance for the given entity name.entityName
- The entity nameCopyright © 2017 JBoss by Red Hat. All rights reserved.