|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EntityManager
The main application interface to the persistence context.
| Method Summary | ||
|---|---|---|
void |
clear()
Clears the context, causing all entities to become detached. |
|
void |
clear(java.lang.Object entity)
Clears the entity |
|
void |
close()
Closes the entity manager. |
|
boolean |
contains(java.lang.Object entity)
Check if the instance belongs to the current context. |
|
Query |
createNamedQuery(java.lang.String name)
Creates a named query. |
|
Query |
createNativeQuery(java.lang.String sql)
Creates a native SQL query. |
|
Query |
createNativeQuery(java.lang.String sql,
java.lang.Class resultClass)
Creates a native SQL query. |
|
Query |
createNativeQuery(java.lang.String sql,
java.lang.String resultSetMapping)
Creates a query for SQL. |
|
Query |
createQuery(java.lang.String ql)
Creates a new query. |
|
|
find(java.lang.Class<T> entityCLass,
java.lang.Object primaryKey)
Find based on the primary key. |
|
|
find(java.lang.Class<T> entityCLass,
java.lang.Object primaryKey,
LockModeType lockMode)
Find based on the primary key. |
|
|
find(java.lang.Class<T> entityCLass,
java.lang.Object primaryKey,
LockModeType lockMode,
java.util.Map properties)
Find based on the primary key. |
|
void |
flush()
Synchronize the context with the database. |
|
java.lang.Object |
getDelegate()
Gets the delegate. |
|
EntityManagerFactory |
getEntityManagerFactory()
Returns the owning factory |
|
FlushModeType |
getFlushMode()
Returns the flush mode for the objects in the context. |
|
LockModeType |
getLockMode(java.lang.Object entity)
Returns the lock mode for the entity |
|
java.util.Map |
getProperties()
Returns the properties for the entity manager |
|
|
getReference(java.lang.Class<T> entityClass,
java.lang.Object primaryKey)
Gets an instance whose state may be lazily fetched. |
|
java.util.Set<java.lang.String> |
getSupportedProperties()
Returns the supported properties for the entity manager |
|
EntityTransaction |
getTransaction()
Returns the transaction manager object. |
|
boolean |
isOpen()
Returns true if the entity manager is open. |
|
void |
joinTransaction()
Joins the transaction. |
|
void |
lock(java.lang.Object entity,
LockModeType lockMode)
Sets the lock mode for an entity. |
|
void |
lock(java.lang.Object entity,
LockModeType lockMode,
java.util.Map properties)
Sets the lock mode for an entity. |
|
|
merge(T entity)
Merge the state of the entity to the current context. |
|
void |
persist(java.lang.Object entity)
Makes an object managed and persistent. |
|
void |
refresh(java.lang.Object entity)
Update 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 properties)
Update the state of the instance from the database. |
|
void |
remove(java.lang.Object entity)
Removes the instance. |
|
void |
setFlushMode(FlushModeType flushMode)
Sets the flush mode for all objects in the context. |
|
| Method Detail |
|---|
void persist(java.lang.Object entity)
<T> T merge(T entity)
void remove(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 properties)
<T> T getReference(java.lang.Class<T> entityClass,
java.lang.Object primaryKey)
void flush()
void setFlushMode(FlushModeType flushMode)
FlushModeType getFlushMode()
void lock(java.lang.Object entity,
LockModeType lockMode)
void lock(java.lang.Object entity,
LockModeType lockMode,
java.util.Map properties)
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 properties)
void clear()
void clear(java.lang.Object entity)
boolean contains(java.lang.Object entity)
LockModeType getLockMode(java.lang.Object entity)
java.util.Map getProperties()
java.util.Set<java.lang.String> getSupportedProperties()
Query createQuery(java.lang.String ql)
Query createNamedQuery(java.lang.String name)
Query createNativeQuery(java.lang.String sql)
Query createNativeQuery(java.lang.String sql,
java.lang.Class resultClass)
Query createNativeQuery(java.lang.String sql,
java.lang.String resultSetMapping)
void joinTransaction()
java.lang.Object getDelegate()
void close()
boolean isOpen()
EntityTransaction getTransaction()
EntityManagerFactory getEntityManagerFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||