public abstract class EntityCRUDService<ENTITY extends umun.iam.model.Meta> extends Object
| Constructor and Description |
|---|
EntityCRUDService() |
| Modifier and Type | Method and Description |
|---|---|
List<ENTITY> |
addPrefs(List<ENTITY> entites) |
protected void |
afterCreate(ENTITY entity) |
ENTITY |
create(ENTITY entity,
umun.iam.model.User createdBy) |
ENTITY |
delete(long entityId,
umun.iam.model.User modifiedBy) |
List<EntityCreateOption> |
getCreateOptions() |
protected abstract String |
getEntityName() |
protected abstract EntityService<ENTITY,?,?> |
getEntityService() |
protected abstract EntityFilterService<ENTITY> |
getFilterService() |
protected abstract EntityCRUDRepository<ENTITY> |
getRepository() |
List<ENTITY> |
read() |
List<ENTITY> |
read(boolean allowDeleted) |
List<ENTITY> |
read(NamedEntity filter) |
List<ENTITY> |
read(Set<Long> ids) |
ENTITY |
readOrFail(Long entityId,
umun.iam.model.User requestedBy) |
protected abstract ENTITY |
setValuesOnUpdate(ENTITY savedEntity,
ENTITY entity,
umun.iam.model.User modifiedBy) |
protected abstract ENTITY |
setVariablesOnCreate(ENTITY entity) |
ENTITY |
update(long entityId,
ENTITY entity,
umun.iam.model.User modifiedBy) |
protected abstract void |
validateCreate(ENTITY entity,
umun.iam.model.User createdBy) |
protected abstract void |
validateDelete(ENTITY savedEntity,
umun.iam.model.User modifiedBy) |
protected abstract void |
validateUpdate(ENTITY savedEntity,
ENTITY entity,
umun.iam.model.User modifiedBy) |
protected abstract EntityService<ENTITY,?,?> getEntityService()
protected abstract EntityCRUDRepository<ENTITY> getRepository()
protected abstract String getEntityName()
protected abstract void validateCreate(ENTITY entity, umun.iam.model.User createdBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected abstract void validateUpdate(ENTITY savedEntity, ENTITY entity, umun.iam.model.User modifiedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected abstract void validateDelete(ENTITY savedEntity, umun.iam.model.User modifiedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected abstract ENTITY setValuesOnUpdate(ENTITY savedEntity, ENTITY entity, umun.iam.model.User modifiedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected abstract ENTITY setVariablesOnCreate(ENTITY entity) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected abstract EntityFilterService<ENTITY> getFilterService()
public ENTITY create(ENTITY entity, umun.iam.model.User createdBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic List<ENTITY> read() throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic List<ENTITY> read(NamedEntity filter) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic List<ENTITY> read(Set<Long> ids) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic ENTITY readOrFail(Long entityId, umun.iam.model.User requestedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic ENTITY update(long entityId, ENTITY entity, umun.iam.model.User modifiedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic ENTITY delete(long entityId, umun.iam.model.User modifiedBy) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionpublic List<ENTITY> addPrefs(List<ENTITY> entites) throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionprotected void afterCreate(ENTITY entity)
public List<EntityCreateOption> getCreateOptions() throws umun.core.constants.ValidationException
umun.core.constants.ValidationExceptionCopyright © 2022 Pivotal Software, Inc.. All rights reserved.