public class EntityManagerImpl extends Object implements EntityManager
| Constructor and Description |
|---|
EntityManagerImpl(DBSession session) |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
findEntities(Class<T> types,
QueryBuilder builder) |
<T> List<T> |
findEntities(Class<T> types,
QueryBuilder builder,
int limit) |
<T> List<T> |
findEntities(Class<T> types,
QueryBuilder builder,
int start,
int limit) |
<T> T |
findEntity(Class<T> type,
String entityId)
Finds an entity by the identifier
|
SimpleEntity |
persist(Object persistableObject)
Does a persist which can either be a create or update operation against the database.
|
void |
remove(Object persistableObject)
Removes the object from storage
|
public EntityManagerImpl(DBSession session)
public SimpleEntity persist(Object persistableObject) throws JasDBStorageException
EntityManagerpersist in interface EntityManagerpersistableObject - The object to persistJasDBStorageException - If unable to store the objectpublic void remove(Object persistableObject) throws JasDBStorageException
EntityManagerremove in interface EntityManagerpersistableObject - The object to remove from storageJasDBStorageException - If unable to delete the object from storagepublic <T> T findEntity(Class<T> type, String entityId) throws JasDBStorageException
EntityManagerfindEntity in interface EntityManagerT - The generic entity typetype - The target entity type you are trying to loadentityId - The identifier of the entityJasDBStorageException - If unable to load entity from storage or unable to map to target typepublic <T> List<T> findEntities(Class<T> types, QueryBuilder builder) throws JasDBStorageException
findEntities in interface EntityManagerT - The generic entity typetypes - The target entity type you are trying to loadbuilder - The queryJasDBStorageException - If unable to load entities from storage or unable to map to target typepublic <T> List<T> findEntities(Class<T> types, QueryBuilder builder, int limit) throws JasDBStorageException
findEntities in interface EntityManagerT - The generic entity typetypes - The target entity type you are trying to loadbuilder - The querylimit - The maximum amount of entities to loadJasDBStorageException - If unable to load entities from storage or unable to map to target typepublic <T> List<T> findEntities(Class<T> types, QueryBuilder builder, int start, int limit) throws JasDBStorageException
findEntities in interface EntityManagerT - The generic entity typetypes - The target entity type you are trying to loadbuilder - The querystart - The starting pagination pagelimit - The maximum amount of entities to loadJasDBStorageException - If unable to load entities from storage or unable to map to target typeCopyright © 2015. All rights reserved.