public interface EntityManager
Date: 2014-10-23,13:05:21 +0800
CriteriaQuery| Modifier and Type | Method and Description |
|---|---|
<E,K> int |
deleteEntity(Class<E> cls,
K key)
Delete an entity by primary keys.
|
<T> int |
executeDelete(CriteriaDelete<T> deleteQuery)
Delete entities by the CriteriaUpdate object.
|
<T> List<T> |
executeQuery(CriteriaQuery<T> criteriaQuery)
Query the object list by the CriteriaQuery object.
|
<T> List<T> |
executeQuery(CriteriaQuery<T> criteriaQuery,
int startPosition,
int maxResult)
Query the object list by the CriteriaQuery object.
|
<T> T |
executeQueryObject(CriteriaQuery<T> criteriaQuery)
Query the first object by the CriteriaQuery object.
|
<T> int |
executeQueryPage(CriteriaQuery<T> criteriaQuery,
List<T> page,
int startPosition,
int maxResult)
Query the object list by the CriteriaQuery object and fill into page
|
<T> int |
executeUpdate(CriteriaUpdate<T> updateQuery)
Update entities by the CriteriaUpdate object.
|
<E,K> E |
findEntity(Class<E> cls,
K key)
Find an entity object by primary keys.
|
CriteriaBuilder |
getCriteriaBuilder()
Return an instance of
CriteriaBuilder for the creation of CriteriaQuery,
CriteriaUpdateor CriteriaDelete objects. |
<E> EntityType<E> |
initEntityClass(Class<E> entityClass)
Init the entity class
|
<E> E |
insertEntity(Class<E> cls,
E entity)
Insert an entity object and return the entity object maybe filled with its key.
|
<E,K> int |
updateEntity(Class<E> cls,
E entity)
Update an entity object with primary keys.
|
<E> EntityType<E> initEntityClass(Class<E> entityClass)
entityClass - the entity class object with annotation EntityIllegalArgumentException<E> E insertEntity(Class<E> cls, E entity) throws SQLException
cls - the entity class object with annotation Entityentity - the entity objectSQLException<E,K> int updateEntity(Class<E> cls, E entity) throws SQLException
cls - the entity class object with annotation Entityentity - the entity objectkey - the key of the entity.SQLException<E,K> int deleteEntity(Class<E> cls, K key) throws SQLException
cls - the entity class object with annotation Entitykey - the keys of the entity.SQLException<E,K> E findEntity(Class<E> cls, K key) throws SQLException
cls - the entity class object with annotation Entitykeys - the keys of the entity.SQLException<T> T executeQueryObject(CriteriaQuery<T> criteriaQuery)
criteriaQuery - the CriteriaQuery object.<T> List<T> executeQuery(CriteriaQuery<T> criteriaQuery)
criteriaQuery - the CriteriaQuery object.<T> List<T> executeQuery(CriteriaQuery<T> criteriaQuery, int startPosition, int maxResult)
criteriaQuery - the CriteriaQuery object.startPosition - position of the first result, numbered from 0maxResult - maximum number of results to retrieve<T> int executeQueryPage(CriteriaQuery<T> criteriaQuery, List<T> page, int startPosition, int maxResult)
criteriaQuery - the CriteriaQuery object.page - the page containerstartPosition - position of the first result, numbered from 0maxResult - maximum number of results to retrieve<T> int executeUpdate(CriteriaUpdate<T> updateQuery)
updateQuery - the CriteriaUpdate object.<T> int executeDelete(CriteriaDelete<T> deleteQuery)
deleteQuery - the CriteriaDelete object.CriteriaBuilder getCriteriaBuilder()
CriteriaBuilder for the creation of CriteriaQuery,
CriteriaUpdateor CriteriaDelete objects.Copyright © 2084–2018 dukeware.com. All rights reserved.