| Constructor and Description |
|---|
PersistenceContext(javax.persistence.EntityManager em)
Provides access to a single JDBC connection and its EntityManager, and several utility methods.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
java.sql.Connection |
getConnection()
The underlying JDBC connection.
|
javax.persistence.EntityManager |
getEm()
the entity manager reference
|
org.hibernate.internal.SessionImpl |
getSession()
Hibernate session; you can e.g. create a criteria query from this session:
https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/querycriteria.html
|
public PersistenceContext(javax.persistence.EntityManager em)
Provides access to a single JDBC connection and its EntityManager, and several utility methods.
The DBKt.db function executes block in context of this class.
em - the entity manager referenceDBKt.dbpublic java.sql.Connection getConnection()
The underlying JDBC connection.
public org.hibernate.internal.SessionImpl getSession()
Hibernate session; you can e.g. create a criteria query from this session: https://docs.jboss.org/hibernate/orm/3.3/reference/en/html/querycriteria.html
public void close()
public javax.persistence.EntityManager getEm()
the entity manager reference