|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ExtendedEntityManager
Interface that combines EntityManager operations and extended operations.
| Method Summary | ||
|---|---|---|
void |
evict(java.lang.Object entity)
Remove this instance from the session cache. |
|
|
find(java.lang.Class<T> clazz,
java.lang.Object id)
Retrieves a single persistent instance from the database |
|
|
find(java.lang.String queryString,
java.lang.Object... params)
Retrieves a non-paged query. |
|
|
findAll(java.lang.Class<T> clazz)
Retrieves all records for a specified persistent class This method should be used with care, as it could instantiate huge amounts of data. |
|
|
findNamed(java.lang.String namedQuery,
java.lang.Object... params)
Retrieves a non-paged query This method should be used with care, as it could instantiate huge amounts of data. |
|
|
findNamedSingle(java.lang.String namedQuery,
java.lang.Object... params)
Execute a query that retrieves a single object. |
|
|
findSingle(java.lang.String queryString,
java.lang.Object... params)
|
|
java.lang.String |
getIdPropertyName(java.lang.Class<?> clazz)
|
|
java.lang.String |
getVersionPropertyName(java.lang.Class<?> clazz)
|
|
|
getVersionValue(java.lang.Object entity)
|
|
|
query(PagedListCriteria criteria)
Retrieve a paged query. |
|
|
remove(java.lang.Class<T> clazz,
java.lang.Object id)
Removes a persistent instance |
|
void |
setReadOnly(java.lang.Object entity,
boolean readOnly)
Sets an instance to readOnly. |
|
int |
update(java.lang.String queryString,
java.lang.Object... params)
Execute a query that updates the database. |
|
| Methods inherited from interface javax.persistence.EntityManager |
|---|
clear, close, contains, createNamedQuery, createNativeQuery, createNativeQuery, createNativeQuery, createQuery, flush, getDelegate, getFlushMode, getReference, getTransaction, isOpen, joinTransaction, lock, merge, persist, refresh, remove, setFlushMode |
| Method Detail |
|---|
<T> PagedListData<T> query(PagedListCriteria criteria)
T - The type of the result itemscriteria - The criteria of the paged query: page index, page size, sorting, etc.
<T> java.util.List<T> find(java.lang.String queryString,
java.lang.Object... params)
T - The type of the result itemsqueryString - the query to executeparams - the parameters to be added to the query, in order
<T> T findSingle(java.lang.String queryString,
java.lang.Object... params)
queryString - the query to executeparams - the parameters to be added to the query, in order
javax.persistence.NoResultException - if there is no result
javax.persistence.NonUniqueResultException - if there is more than one result
java.lang.IllegalStateException - if called for a Java
Persistence query language UPDATE or DELETE statement
<T> T remove(java.lang.Class<T> clazz,
java.lang.Object id)
T - The persistent classclazz - The persistent classid - the primary key to remove
EntityNotFoundException - if the entity could not be found<T> java.util.List<T> findAll(java.lang.Class<T> clazz)
T - The persistent class to retrieveclazz - The persistent class to retrieve
<T> T find(java.lang.Class<T> clazz,
java.lang.Object id)
find in interface javax.persistence.EntityManagerT - The class to retrieveclazz - The class to retrieveid - The primary key to retrieve
EntityNotFoundException - if the enity could not be retrieved
<T> java.util.List<T> findNamed(java.lang.String namedQuery,
java.lang.Object... params)
T - The type of the result itemsnamedQuery - the named query to executeparams - the parameters to be added to the query, in order
<T> T findNamedSingle(java.lang.String namedQuery,
java.lang.Object... params)
T - The type of the result itemsnamedQuery - the named query to executeparams - the parameters to be added to the query, in order
javax.persistence.NoResultException - if there is no result
javax.persistence.NonUniqueResultException - if more than one result
java.lang.IllegalStateException - if called for a Java
Persistence query language UPDATE or DELETE statement
int update(java.lang.String queryString,
java.lang.Object... params)
queryString - the update/delete/insert query to executeparams - the parameters to be added to the query, in order
java.lang.String getIdPropertyName(java.lang.Class<?> clazz)
clazz - the persistent class
java.lang.UnsupportedOperationException - if this feature has not been implementedjava.lang.String getVersionPropertyName(java.lang.Class<?> clazz)
clazz - the persistent class
java.lang.UnsupportedOperationException - if this feature has not been implemented<T> T getVersionValue(java.lang.Object entity)
entity - the persistent entity to inspect
java.lang.UnsupportedOperationException - if this feature has not been implementedvoid evict(java.lang.Object entity)
entity - a persistent instance
void setReadOnly(java.lang.Object entity,
boolean readOnly)
entity - a persistent instancereadOnly - true to set the entity to readOnly
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||