public class JtaEntityManager
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
JtaEntityManager.Timer |
Constructor and Description |
---|
JtaEntityManager(JtaEntityManagerRegistry registry,
EntityManagerFactory entityManagerFactory,
java.util.Map properties,
java.lang.String unitName,
java.lang.String synchronizationType) |
JtaEntityManager(java.lang.String unitName,
JtaEntityManagerRegistry registry,
EntityManagerFactory entityManagerFactory,
java.util.Map properties,
boolean extended,
java.lang.String synchronizationType) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
close()
close throws an IllegalStateException if the em is container managed otherwise (emf.newEM()) it is delegated to the user
|
boolean |
contains(java.lang.Object entity) |
<T> <any> |
createEntityGraph(java.lang.Class<T> rootType) |
<any> |
createEntityGraph(java.lang.String graphName) |
Query |
createNamedQuery(java.lang.String name) |
<T> <any> |
createNamedQuery(java.lang.String name,
java.lang.Class<T> resultClass) |
StoredProcedureQuery |
createNamedStoredProcedureQuery(java.lang.String name) |
Query |
createNativeQuery(java.lang.String sqlString) |
Query |
createNativeQuery(java.lang.String sqlString,
java.lang.Class resultClass) |
Query |
createNativeQuery(java.lang.String sqlString,
java.lang.String resultSetMapping) |
<T> <any> |
createQuery(<any> criteriaQuery) |
Query |
createQuery(CriteriaDelete deleteQuery) |
Query |
createQuery(CriteriaUpdate updateQuery) |
Query |
createQuery(java.lang.String qlString) |
<T> <any> |
createQuery(java.lang.String qlString,
java.lang.Class<T> resultClass) |
StoredProcedureQuery |
createStoredProcedureQuery(java.lang.String procedureName) |
StoredProcedureQuery |
createStoredProcedureQuery(java.lang.String procedureName,
java.lang.Class... resultClasses) |
StoredProcedureQuery |
createStoredProcedureQuery(java.lang.String procedureName,
java.lang.String... resultSetMappings) |
void |
detach(java.lang.Object entity) |
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey) |
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
LockModeType lockMode) |
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties) |
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
java.util.Map<java.lang.String,java.lang.Object> properties) |
void |
flush() |
CriteriaBuilder |
getCriteriaBuilder() |
EntityManager |
getDelegate() |
<any> |
getEntityGraph(java.lang.String graphName) |
<T> java.util.List<<any>> |
getEntityGraphs(java.lang.Class<T> entityClass) |
EntityManagerFactory |
getEntityManagerFactory() |
FlushModeType |
getFlushMode() |
LockModeType |
getLockMode(java.lang.Object entity) |
Metamodel |
getMetamodel() |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
<T> T |
getReference(java.lang.Class<T> entityClass,
java.lang.Object primaryKey) |
EntityTransaction |
getTransaction() |
boolean |
isJoinedToTransaction() |
static boolean |
isJPA21(EntityManagerFactory entityManagerFactory) |
boolean |
isOpen() |
void |
joinTransaction() |
void |
lock(java.lang.Object entity,
LockModeType lockMode) |
void |
lock(java.lang.Object entity,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties) |
<T> T |
merge(T entity) |
void |
persist(java.lang.Object entity) |
void |
refresh(java.lang.Object entity) |
void |
refresh(java.lang.Object entity,
LockModeType lockMode) |
void |
refresh(java.lang.Object entity,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties) |
void |
refresh(java.lang.Object entity,
java.util.Map<java.lang.String,java.lang.Object> properties) |
void |
remove(java.lang.Object entity) |
void |
setFlushMode(FlushModeType flushMode) |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
<T> T |
unwrap(java.lang.Class<T> cls) |
protected java.lang.Object |
writeReplace() |
public JtaEntityManager(JtaEntityManagerRegistry registry, EntityManagerFactory entityManagerFactory, java.util.Map properties, java.lang.String unitName, java.lang.String synchronizationType)
public JtaEntityManager(java.lang.String unitName, JtaEntityManagerRegistry registry, EntityManagerFactory entityManagerFactory, java.util.Map properties, boolean extended, java.lang.String synchronizationType)
public static boolean isJPA21(EntityManagerFactory entityManagerFactory)
public EntityManager getDelegate()
public void persist(java.lang.Object entity)
public <T> T merge(T entity)
public void remove(java.lang.Object entity)
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey)
public <T> T getReference(java.lang.Class<T> entityClass, java.lang.Object primaryKey)
public void flush()
public void setFlushMode(FlushModeType flushMode)
public FlushModeType getFlushMode()
public void lock(java.lang.Object entity, LockModeType lockMode)
public void refresh(java.lang.Object entity)
public void clear()
public boolean contains(java.lang.Object entity)
public Query createQuery(java.lang.String qlString)
public Query createNamedQuery(java.lang.String name)
public Query createNativeQuery(java.lang.String sqlString)
public Query createNativeQuery(java.lang.String sqlString, java.lang.Class resultClass)
public Query createNativeQuery(java.lang.String sqlString, java.lang.String resultSetMapping)
public void joinTransaction()
public void close()
public boolean isOpen()
public EntityTransaction getTransaction()
public <T> <any> createNamedQuery(java.lang.String name, java.lang.Class<T> resultClass)
public <T> <any> createQuery(<any> criteriaQuery)
public <T> <any> createQuery(java.lang.String qlString, java.lang.Class<T> resultClass)
public void detach(java.lang.Object entity)
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, java.util.Map<java.lang.String,java.lang.Object> properties)
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, LockModeType lockMode)
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, LockModeType lockMode, java.util.Map<java.lang.String,java.lang.Object> properties)
public EntityManagerFactory getEntityManagerFactory()
public LockModeType getLockMode(java.lang.Object entity)
public Metamodel getMetamodel()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public CriteriaBuilder getCriteriaBuilder()
public void lock(java.lang.Object entity, LockModeType lockMode, java.util.Map<java.lang.String,java.lang.Object> properties)
public void refresh(java.lang.Object entity, java.util.Map<java.lang.String,java.lang.Object> properties)
public void refresh(java.lang.Object entity, LockModeType lockMode)
public void refresh(java.lang.Object entity, LockModeType lockMode, java.util.Map<java.lang.String,java.lang.Object> properties)
public void setProperty(java.lang.String name, java.lang.Object value)
public <T> T unwrap(java.lang.Class<T> cls)
protected java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public StoredProcedureQuery createNamedStoredProcedureQuery(java.lang.String name)
public StoredProcedureQuery createStoredProcedureQuery(java.lang.String procedureName)
public StoredProcedureQuery createStoredProcedureQuery(java.lang.String procedureName, java.lang.Class... resultClasses)
public StoredProcedureQuery createStoredProcedureQuery(java.lang.String procedureName, java.lang.String... resultSetMappings)
public Query createQuery(CriteriaUpdate updateQuery)
public Query createQuery(CriteriaDelete deleteQuery)
public <T> <any> createEntityGraph(java.lang.Class<T> rootType)
public <any> createEntityGraph(java.lang.String graphName)
public <any> getEntityGraph(java.lang.String graphName)
public <T> java.util.List<<any>> getEntityGraphs(java.lang.Class<T> entityClass)
public boolean isJoinedToTransaction()