T - Type of the entity, which inherits from AbstractLockableEntity.public abstract class AEntityAPI<T extends ITransferableEntity> extends ASubAPI
ITransferableEntity.| Modifier and Type | Field and Description |
|---|---|
protected Class<T> |
entityClass |
| Constructor and Description |
|---|
AEntityAPI()
Instantiates a new entity API.
|
| Modifier and Type | Method and Description |
|---|---|
T |
create(UserContext uc,
T entity)
Method for creating a entity.
|
T[] |
create(UserContext uc,
T[] entities)
Method for creating multiple entities.
|
Boolean |
delete(UserContext uc,
T entity)
Method for deleting a entity.
|
Boolean |
delete(UserContext uc,
T[] entities)
Method for deleting multiple entities.
|
Boolean |
deleteAllBy(UserContext uc,
de.xima.cmn.criteria.QueryCriteriaManager qcm)
Method for deleting entities using a
QueryCriteriaManagers. |
Boolean |
deleteById(UserContext uc,
Integer id) |
Boolean |
deleteById(UserContext uc,
Long id)
Method for deleting a entity by ID.
|
List<T> |
getAll(UserContext uc)
Method for determining all available entities in the user context.
|
List<T> |
getAllBy(UserContext uc,
de.xima.cmn.criteria.QueryCriteriaManager qcm)
Method for determining all entities using a
QueryCriteriaManagers. |
T |
getBy(UserContext uc,
de.xima.cmn.criteria.QueryCriteriaManager qcm)
Method for determining an entity using a
QueryCriteriaManagers. |
T |
getById(UserContext uc,
Integer id) |
T |
getById(UserContext uc,
Long id)
Method for determining an entity by ID.
|
int |
resultTotalCount(UserContext uc,
de.xima.cmn.criteria.QueryCriteriaManager qcm)
Method for determining the number of hits when searching for entities using a
QueryCriteriaManager. |
T |
update(UserContext uc,
T entity)
Method for updating a entity.
|
T[] |
update(UserContext uc,
T[] entities)
Method for updating multiple entities.
|
getHandlerProviderprotected Class<T extends ITransferableEntity> entityClass
public T create(UserContext uc, T entity)
uc - UserContext the user context in which the action is to be performed.entity - the entity to be created.public T[] create(UserContext uc, T[] entities)
uc - UserContext the user context in which the action is to be performed.entities - a Array of the entities to be created.Array of the created entities.public T update(UserContext uc, T entity)
uc - UserContext the user context in which the action is to be performed.entity - the entity to be update.public Boolean delete(UserContext uc, T entity)
uc - UserContext the user context in which the action is to be performed.entity - the entity to be deleted.Boolean if the deletion was successful.public Boolean delete(UserContext uc, T[] entities)
uc - UserContext the user context in which the action is to be performed.entities - a Array of the entities to be deleted.Boolean if the deletion was successful.public T[] update(UserContext uc, T[] entities)
uc - UserContext the user context in which the action is to be performed.entities - a Array of the entities to be updated.Array with the updated entities.public List<T> getAll(UserContext uc)
uc - UserContext the user context in which the action is to be performed.List of the available entities.public T getById(UserContext uc, Long id)
uc - UserContext the user context in which the action is to be performed.id - Integer the ID of the entity.public T getById(UserContext uc, Integer id)
public Boolean deleteById(UserContext uc, Long id)
uc - UserContext the user context in which the action is to be performed.id - Integer the ID of the entity to be deleted.Boolean if the deletion was successful.public Boolean deleteById(UserContext uc, Integer id)
public int resultTotalCount(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm)
QueryCriteriaManager.uc - UserContext the user context in which the action is to be performed.qcm - the QueryCriteriaManager which should be used for the search.Integer the found number of entitiespublic T getBy(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm)
QueryCriteriaManagers.uc - UserContext the user context in which the action is to be performed.qcm - the QueryCriteriaManager which should be used for the search.public List<T> getAllBy(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm)
QueryCriteriaManagers.uc - UserContext the user context in which the action is to be performed.qcm - the QueryCriteriaManager which should be used for the search.List the found entities.public Boolean deleteAllBy(UserContext uc, de.xima.cmn.criteria.QueryCriteriaManager qcm)
QueryCriteriaManagers.uc - UserContext the user context in which the action is to be performed.qcm - the QueryCriteriaManager which should be used when deleting.Boolean if the deletion was successful.Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.