-
- All Implemented Interfaces:
-
java.io.Closeable,java.lang.AutoCloseable
public final class PersistenceContext implements Closeable
Provides access to a single JDBC connection and its EntityManager, and several utility methods.
The db function executes block in context of this class.
-
-
Field Summary
Fields Modifier and Type Field Description private final Connectionconnectionprivate final SessionImplsessionprivate final EntityManagerem
-
Constructor Summary
Constructors Constructor Description PersistenceContext(EntityManager em)
-
Method Summary
Modifier and Type Method Description Unitclose()final ConnectiongetConnection()final SessionImplgetSession()final EntityManagergetEm()-
-
Method Detail
-
getConnection
final Connection getConnection()
-
getSession
final SessionImpl getSession()
-
getEm
final EntityManager getEm()
-
-
-
-