public class HibernateSimpleSession extends Object implements SqlSession
Session.
It's the first parameter to all primary methods in the SqlQueryEngine and SqlCrudEngine.
The primary contract is the method for the SqlQuery instance creation.
For more info please see the Tutorials.
| Modifier and Type | Field and Description |
|---|---|
private String |
name
The name of the database related to this session.
|
private org.hibernate.Session |
session
The Hibernate Session, the first level cache and the context for all database operations.
|
| Constructor and Description |
|---|
HibernateSimpleSession(org.hibernate.Session session)
Creates a new instance of this dynamic proxy.
|
HibernateSimpleSession(org.hibernate.Session session,
String name)
Creates a new instance of this dynamic proxy.
|
| Modifier and Type | Method and Description |
|---|---|
SqlQuery |
createSqlQuery(String queryString) |
int[] |
executeBatch(String... statements) |
String |
getName() |
org.hibernate.Session |
getSession()
Returns the internal Hibernate Session instance.
|
void |
setSession(org.hibernate.Session session)
Sets the internal Hibernate Session instance.
|
private org.hibernate.Session session
private String name
public HibernateSimpleSession(org.hibernate.Session session)
session - the Hibernate Session instancepublic HibernateSimpleSession(org.hibernate.Session session,
String name)
session - the Hibernate Session instancename - the name of the databasepublic org.hibernate.Session getSession()
public void setSession(org.hibernate.Session session)
session - the internal Hibernate Session instancepublic SqlQuery createSqlQuery(String queryString) throws SqlProcessorException
createSqlQuery in interface SqlSessionSqlProcessorExceptionpublic int[] executeBatch(String... statements) throws SqlProcessorException
executeBatch in interface SqlSessionSqlProcessorExceptionpublic String getName()
getName in interface SqlSessionCopyright © 2016. All rights reserved.