Session and StatelessSession.
NOTE : Poorly named. "shared" simply indicates that its a unified contract between Session and
StatelessSession.
| Modifier and Type | Method and Description |
|---|---|
| public Transaction | Returns: a Transaction instanceBegin a unit of work and return the associated |
| public void | |
| public Criteria | Returns: The criteria instance for manipulation and executionThe class, which is an entity, or has entity subclasses/implementors persistentClass)
Deprecated
(since 5.2) for Session, use the JPA Criteria
Create Criteria instance for the given class (entity or subclasses/implementors).
|
| public Criteria | Returns: The criteria instance for manipulation and executionThe class, which is an entity, or has entity subclasses/implementors persistentClass, String The alias to use alias)
Deprecated
(since 5.2) for Session, use the JPA Criteria
Create Criteria instance for the given class (entity or subclasses/implementors), using a specific
alias.
|
| public Criteria | Returns: The criteria instance for manipulation and executionThe entity name entityName)
Deprecated
(since 5.2) for Session, use the JPA Criteria
Create Criteria instance for the given entity name.
|
| public Criteria | Returns: The criteria instance for manipulation and executionThe entity name entityName, String The alias to use alias)
Deprecated
(since 5.2) for Session, use the JPA Criteria
Create Criteria instance for the given entity name, using a specific alias.
|
| public Query | createQuery(String
The HQL/JPQL query queryString)Redeclares org.
Deprecated
as a consequence of
Create a Query being deprecated.
Query instance for the given HQL/JPQL query string.
|
| public ProcedureCall | Returns: The representation of the procedure call.The name of the procedure. procedureName)
Deprecated
as a consequence of
Creates a call to a stored procedure.
ProcedureCall being deprecated.
|
| public ProcedureCall | Returns: The representation of the procedure call.The name of the procedure. procedureName, Class<T>... The entity(s) to map the result on to. resultClasses)
Deprecated
as a consequence of
Creates a call to a stored procedure with specific result set entity mappings.
ProcedureCall being deprecated.
|
| public ProcedureCall | Returns: The representation of the procedure call.The name of the procedure. procedureName, String... The explicit result set mapping(s) to use for mapping the results resultSetMappings)
Deprecated
as a consequence of
Creates a call to a stored procedure with specific result set entity mappings.
ProcedureCall being deprecated.
|
| public default < The type of the result returned from the work T> T | Returns: the result from callingReturningWork#execute.The work to be performed. work)Controller for allowing users to perform JDBC related work using the Connection managed by this Session. |
| public default void | |
| public Integer | Returns: Session-level JDBC batch sizeGet the Session-level JDBC batch size for the current Session. |
| public ProcedureCall | Returns: The ProcedureCallThe name given to the template name)
Deprecated
as a consequence of
Gets a ProcedureCall based on a named template
ProcedureCall being deprecated.
|
| public Query | getNamedQuery(String
the name of a pre-defined, named query queryName)Redeclares org.
Deprecated
as a consequence of
Create a Query being deprecated.
Query instance for the named query.
|
| public String | Returns: The tenant identifier associated with this session, ornullObtain the tenant identifier associated with this session. |
| public Transaction | Returns: a Transaction instanceGet the |
| public boolean | |
| public boolean | |
| public void | setJdbcBatchSize(Integer
Session-level JDBC batch size jdbcBatchSize)Set the Session-level JDBC batch size. |
| beginTransaction | back to summary |
|---|---|
| public Transaction beginTransaction() Begin a unit of work and return the associated
| |
| close | back to summary |
|---|---|
| public void close() throws HibernateException End the session by releasing the JDBC connection and cleaning up.
| |
| createCriteria | back to summary |
|---|---|
| public Criteria createCriteria(Class<T> persistentClass)
Deprecated (since 5.2) for Session, use the JPA Criteria Create | |
| createCriteria | back to summary |
|---|---|
| public Criteria createCriteria(Class<T> persistentClass, String alias)
Deprecated (since 5.2) for Session, use the JPA Criteria Create
| |
| createCriteria | back to summary |
|---|---|
| public Criteria createCriteria(String entityName)
Deprecated (since 5.2) for Session, use the JPA Criteria Create | |
| createCriteria | back to summary |
|---|---|
| public Criteria createCriteria(String entityName, String alias)
Deprecated (since 5.2) for Session, use the JPA Criteria Create
| |
| createQuery | back to summary |
|---|---|
| public Query Redeclares org. Doc from org. Deprecated as a consequence of Create a | |
| createStoredProcedureCall | back to summary |
|---|---|
| public ProcedureCall createStoredProcedureCall(String procedureName)
Deprecated as a consequence of Creates a call to a stored procedure.
| |
| createStoredProcedureCall | back to summary |
|---|---|
| public ProcedureCall createStoredProcedureCall(String procedureName, Class<T>... resultClasses)
Deprecated as a consequence of Creates a call to a stored procedure with specific result set entity mappings. Each class named is considered a "root return".
| |
| createStoredProcedureCall | back to summary |
|---|---|
| public ProcedureCall createStoredProcedureCall(String procedureName, String... resultSetMappings)
Deprecated as a consequence of Creates a call to a stored procedure with specific result set entity mappings.
| |
| doReturningWork | back to summary |
|---|---|
| public default <T> T doReturningWork(ReturningWork<T> work) throws HibernateException Controller for allowing users to perform JDBC related work using the Connection managed by this Session. After
execution returns the result of the
| |
| doWork | back to summary |
|---|---|
| public default void doWork(Work work) throws HibernateException Controller for allowing users to perform JDBC related work using the Connection managed by this Session.
| |
| getJdbcBatchSize | back to summary |
|---|---|
| public Integer getJdbcBatchSize() Get the Session-level JDBC batch size for the current Session.
Overrides the SessionFactory JDBC batch size defined by the
| |
| getNamedProcedureCall | back to summary |
|---|---|
| public ProcedureCall getNamedProcedureCall(String name)
Deprecated as a consequence of Gets a ProcedureCall based on a named template
| |
| getNamedQuery | back to summary |
|---|---|
| public Query Redeclares org. Doc from org. Deprecated as a consequence of Create a | |
| getTenantIdentifier | back to summary |
|---|---|
| public String getTenantIdentifier() Obtain the tenant identifier associated with this session.
| |
| getTransaction | back to summary |
|---|---|
| public Transaction getTransaction() Get the
| |
| isConnected | back to summary |
|---|---|
| public boolean isConnected() Check if the session is currently connected.
| |
| isOpen | back to summary |
|---|---|
| public boolean isOpen() Check if the session is still open.
| |
| setJdbcBatchSize | back to summary |
|---|---|
| public void setJdbcBatchSize(Integer jdbcBatchSize) Set the Session-level JDBC batch size.
Overrides the SessionFactory JDBC batch size defined by the
| |