public class JtaEntityManagerImpl extends EntityManagerImpl
| Constructor and Description |
|---|
JtaEntityManagerImpl(JtaEntityManagerFactoryImpl entityManagerFactory,
MetamodelImpl metamodel,
DataSource datasource,
Map<String,Object> properties,
JdbcAdaptor jdbcAdaptor) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertTransaction()
Asserts that a transaction is active.
|
protected void |
closeConnection()
Closes the database connection.
|
void |
closeConnectionIfNecessary()
Closes the connection if the connections is obtained from JTA managed datasource.
|
EntityTransactionImpl |
getTransaction() |
boolean |
hasActiveTransaction()
Returns if the entity manager has an active transaction.
|
boolean |
hasTransactionMarkedForRollback()
Returns if the entity manager has a transaction which is marked for rollback.
|
boolean |
isJoinedToTransaction() |
void |
joinTransaction() |
void |
setRollbackOnly() |
assertOpen, cascadeMerge, clear, clearTransaction, close, contains, createNamedQuery, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, createQuery, createQuery, createQuery, createQuery, detach, detachAllIfNotTransactionScoped, find, find, find, find, flush, getConnection, getCriteriaBuilder, getDelegate, getEntityManagerFactory, getFlushMode, getJdbcAdaptor, getLockMode, getMetamodel, getProperties, getReference, getSession, isOpen, isValid, lock, lock, lock, merge, mergeImpl, persist, persistImpl, refresh, refresh, refresh, refresh, refreshImpl, remove, removeImpl, setFlushMode, setProperty, unwrappublic JtaEntityManagerImpl(JtaEntityManagerFactoryImpl entityManagerFactory, MetamodelImpl metamodel, DataSource datasource, Map<String,Object> properties, JdbcAdaptor jdbcAdaptor)
entityManagerFactory - the entity manager factorymetamodel - the metamodeldatasource - the datasourceproperties - properties for the entity managerjdbcAdaptor - the JDBC adaptorpublic void assertTransaction()
assertTransaction in class EntityManagerImplprotected void closeConnection()
closeConnection in class EntityManagerImplpublic void closeConnectionIfNecessary()
closeConnectionIfNecessary in class EntityManagerImplpublic EntityTransactionImpl getTransaction()
getTransaction in interface javax.persistence.EntityManagergetTransaction in class EntityManagerImplpublic boolean hasActiveTransaction()
hasActiveTransaction in class EntityManagerImplpublic boolean hasTransactionMarkedForRollback()
hasTransactionMarkedForRollback in class EntityManagerImplpublic boolean isJoinedToTransaction()
isJoinedToTransaction in interface javax.persistence.EntityManagerisJoinedToTransaction in class EntityManagerImplpublic void joinTransaction()
joinTransaction in interface javax.persistence.EntityManagerjoinTransaction in class EntityManagerImplpublic void setRollbackOnly()
setRollbackOnly in class EntityManagerImplCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.