public class EntityManagerJtaProxy extends java.lang.Object implements EntityManager, java.io.Serializable, HandleAware
Constructor and Description |
---|
EntityManagerJtaProxy(PersistenceUnitManager pUnit) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the manager.
|
void |
close()
Clears the manager.
|
boolean |
contains(java.lang.Object entity)
Returns true if the entity belongs to the current context.
|
Query |
createNamedQuery(java.lang.String sql)
Creates an instance of the named query
|
<T> TypedQuery<T> |
createNamedQuery(java.lang.String name,
java.lang.Class<T> resultClass)
Creates a named query.
|
Query |
createNativeQuery(java.lang.String sql)
Creates a query.
|
Query |
createNativeQuery(java.lang.String sql,
java.lang.Class retType)
Creates a query.
|
Query |
createNativeQuery(java.lang.String sql,
java.lang.String map)
Creates a query.
|
<T> TypedQuery<T> |
createQuery(CriteriaQuery<T> criteriaQuery)
Creates a TypedQuery for a criteria
|
Query |
createQuery(java.lang.String sql)
Creates a query.
|
<T> TypedQuery<T> |
createQuery(java.lang.String query,
java.lang.Class<T> resultClass)
Creates a TypedQuery for a criteria
|
void |
detach(java.lang.Object entity)
Clears the entity
|
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey)
Find by the primary key.
|
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
LockModeType lockMode)
Find based on the primary key.
|
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties)
Find based on the primary key.
|
<T> T |
find(java.lang.Class<T> entityClass,
java.lang.Object primaryKey,
java.util.Map<java.lang.String,java.lang.Object> properties)
Find based on the primary key.
|
void |
flush()
Synchronize with the database.
|
CriteriaBuilder |
getCriteriaBuilder()
Returns a CriteriaBuilder to create CriteriaQuery objects.
|
java.lang.Object |
getDelegate()
Gets the delegate.
|
EntityManagerFactory |
getEntityManagerFactory()
Returns the owning factory
|
FlushModeType |
getFlushMode()
Returns the flush mode.
|
LockModeType |
getLockMode(java.lang.Object entity)
Returns the lock mode for the entity
|
Metamodel |
getMetamodel()
Returns the Metamodel interface for the persistence unit.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Returns the properties for the entity manager
|
<T> T |
getReference(java.lang.Class<T> entityClass,
java.lang.Object primaryKey)
Find by the primary key.
|
EntityTransaction |
getTransaction()
Returns the entity manager transaction.
|
boolean |
isOpen()
Returns true if open.
|
void |
joinTransaction()
Joins the transaction.
|
void |
lock(java.lang.Object entity,
LockModeType lockMode)
Locks the object.
|
void |
lock(java.lang.Object entity,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties)
Sets the lock mode for an entity.
|
<T> T |
merge(T entity)
Merges the state of the entity into the current context.
|
void |
persist(java.lang.Object entity)
Makes the instance managed.
|
void |
refresh(java.lang.Object entity)
Refresh the state of the instance from the database.
|
void |
refresh(java.lang.Object entity,
LockModeType lockMode)
Update the state of the instance from the database.
|
void |
refresh(java.lang.Object entity,
LockModeType lockMode,
java.util.Map<java.lang.String,java.lang.Object> properties)
Update the state of the instance from the database.
|
void |
refresh(java.lang.Object entity,
java.util.Map<java.lang.String,java.lang.Object> properties)
Update the state of the instance from the database.
|
void |
remove(java.lang.Object entity)
Remove the instance.
|
void |
setExtended(boolean isExtended)
Sets the extended type.
|
void |
setFlushMode(FlushModeType mode)
Sets the flush mode.
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value)
Sets properties for the entity manager
|
void |
setSerializationHandle(java.lang.Object handle)
Serialization handle
|
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> cls)
Returns the object of the type for a provider-specific API
|
public EntityManagerJtaProxy(PersistenceUnitManager pUnit)
public EntityManagerFactory getEntityManagerFactory()
EntityManager
getEntityManagerFactory
in interface EntityManager
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
EntityManager
getProperties
in interface EntityManager
public void setProperty(java.lang.String propertyName, java.lang.Object value)
EntityManager
setProperty
in interface EntityManager
public void joinTransaction()
joinTransaction
in interface EntityManager
public java.lang.Object getDelegate()
getDelegate
in interface EntityManager
public void setExtended(boolean isExtended)
public Metamodel getMetamodel()
EntityManager
getMetamodel
in interface EntityManager
public CriteriaBuilder getCriteriaBuilder()
EntityManager
getCriteriaBuilder
in interface EntityManager
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey)
find
in interface EntityManager
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, java.util.Map<java.lang.String,java.lang.Object> properties)
EntityManager
find
in interface EntityManager
public <T> T find(java.lang.Class<T> entityClass, java.lang.Object primaryKey, LockModeType lockMode)
EntityManager
find
in interface EntityManager
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)
EntityManager
find
in interface EntityManager
public <T> T getReference(java.lang.Class<T> entityClass, java.lang.Object primaryKey)
getReference
in interface EntityManager
public void persist(java.lang.Object entity)
persist
in interface EntityManager
public <T> T merge(T entity)
merge
in interface EntityManager
public void remove(java.lang.Object entity)
remove
in interface EntityManager
public void refresh(java.lang.Object entity)
refresh
in interface EntityManager
public void refresh(java.lang.Object entity, java.util.Map<java.lang.String,java.lang.Object> properties)
EntityManager
refresh
in interface EntityManager
public void refresh(java.lang.Object entity, LockModeType lockMode)
EntityManager
refresh
in interface EntityManager
public void refresh(java.lang.Object entity, LockModeType lockMode, java.util.Map<java.lang.String,java.lang.Object> properties)
EntityManager
refresh
in interface EntityManager
public void detach(java.lang.Object entity)
EntityManager
detach
in interface EntityManager
public boolean contains(java.lang.Object entity)
contains
in interface EntityManager
public FlushModeType getFlushMode()
getFlushMode
in interface EntityManager
public void setFlushMode(FlushModeType mode)
setFlushMode
in interface EntityManager
public void flush()
flush
in interface EntityManager
public LockModeType getLockMode(java.lang.Object entity)
EntityManager
getLockMode
in interface EntityManager
public void lock(java.lang.Object entity, LockModeType lockMode)
lock
in interface EntityManager
public void lock(java.lang.Object entity, LockModeType lockMode, java.util.Map<java.lang.String,java.lang.Object> properties)
EntityManager
lock
in interface EntityManager
public Query createQuery(java.lang.String sql)
createQuery
in interface EntityManager
public Query createNamedQuery(java.lang.String sql)
createNamedQuery
in interface EntityManager
public Query createNativeQuery(java.lang.String sql)
createNativeQuery
in interface EntityManager
public Query createNativeQuery(java.lang.String sql, java.lang.String map)
createNativeQuery
in interface EntityManager
public Query createNativeQuery(java.lang.String sql, java.lang.Class retType)
createNativeQuery
in interface EntityManager
public <T> TypedQuery<T> createNamedQuery(java.lang.String name, java.lang.Class<T> resultClass)
EntityManager
createNamedQuery
in interface EntityManager
public <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery)
EntityManager
createQuery
in interface EntityManager
public <T> TypedQuery<T> createQuery(java.lang.String query, java.lang.Class<T> resultClass)
EntityManager
createQuery
in interface EntityManager
public <T> T unwrap(java.lang.Class<T> cls)
EntityManager
unwrap
in interface EntityManager
public EntityTransaction getTransaction()
getTransaction
in interface EntityManager
public boolean isOpen()
isOpen
in interface EntityManager
public void clear()
clear
in interface EntityManager
public void close()
close
in interface EntityManager
public void setSerializationHandle(java.lang.Object handle)
setSerializationHandle
in interface HandleAware
public java.lang.String toString()
toString
in class java.lang.Object