Package io.tesler.core.crudma.impl
Class HistoricityResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- java.lang.Object
-
- io.tesler.core.crudma.impl.AbstractResponseService<T,E>
-
- io.tesler.core.crudma.impl.VersionAwareResponseService<T,E>
-
- io.tesler.core.crudma.impl.HistoricityResponseService<T,E>
-
- All Implemented Interfaces:
ResponseService<T,E>
public abstract class HistoricityResponseService<T extends HistoricityDto,E extends HistoricityEntity> extends VersionAwareResponseService<T,E>
-
-
Field Summary
-
Fields inherited from class io.tesler.core.crudma.impl.AbstractResponseService
applicationContext, baseDAO, bcSpecificationHolder, linkSpecificationHolder, parentSpec, preActionConditionHolderAssoc, preActionConditionHolderDataResponse, securitySpecificationHolder, typeOfDTO, typeOfEntity
-
-
Constructor Summary
Constructors Constructor Description HistoricityResponseService(Class<T> typeOfDTO, Class<E> typeOfEntity, Class<? extends HistoricityKey<E,T>> historicityKeyClass, Class<? extends HistoricityFieldMetaBuilder<T>> metaBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Actions<T>
actions()
protected ActionResultDTO<T>
copy(BusinessComponent bc, T dto)
protected E
copyEntity(E entity)
ActionResultDTO<T>
deleteEntity(BusinessComponent bc)
Deletes an entity based on a business componentprotected CreateResult<T>
doCreateEntity(E entity, BusinessComponent bc)
protected ActionResultDTO<T>
doUpdateEntity(E entity, T data, BusinessComponent bc)
Actions<T>
getActions()
Returns actions for entity with conditions of their availability invoked by method getAvailableActionsResultPage<T>
getList(BusinessComponent bc)
Returns a list of matched objects based on a business componentprotected org.springframework.data.jpa.domain.Specification<E>
getParentSpecification(BusinessComponent bc)
protected boolean
isActionCopyAvailable(BusinessComponent bc)
protected boolean
isActionCreateAvailable(BusinessComponent bc)
protected boolean
isActionDeleteAvailable(BusinessComponent bc)
protected boolean
isActionSaveAvailable(BusinessComponent bc)
protected abstract void
update(E e, T dto, BusinessComponent bc)
-
Methods inherited from class io.tesler.core.crudma.impl.VersionAwareResponseService
create, createEntity, doPreview, getLockTimeout, loadEntity, preview, updateEntity
-
Methods inherited from class io.tesler.core.crudma.impl.AbstractResponseService
associate, cast, count, count, count, doAssociate, doGetOne, dtoListToResultPage, entitiesToDtos, entityListToResultPage, entityToDto, getAssociatedSsNames, getAvailableActions, getBcSpecification, getFetchGraph, getFetchGraphName, getFieldMetaBuilder, getLinkSpecification, getList, getList, getOne, getOneAsEntity, getPageEntities, getPreActionsForSave, getSecuritySpecification, getSpecification, hasPersister, invokeAction, isDeferredCreationSupported, isExist, onCancel, unwrap, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.tesler.core.service.ResponseService
getTypeOfDTO, getTypeOfEntity
-
-
-
-
Method Detail
-
getList
public final ResultPage<T> getList(BusinessComponent bc)
Description copied from interface:ResponseService
Returns a list of matched objects based on a business component- Specified by:
getList
in interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Overrides:
getList
in classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Parameters:
bc
- businessComponent- Returns:
- list of matched objects
-
getParentSpecification
protected final org.springframework.data.jpa.domain.Specification<E> getParentSpecification(BusinessComponent bc)
- Overrides:
getParentSpecification
in classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>
-
doCreateEntity
protected final CreateResult<T> doCreateEntity(E entity, BusinessComponent bc)
- Specified by:
doCreateEntity
in classVersionAwareResponseService<T extends HistoricityDto,E extends HistoricityEntity>
-
deleteEntity
public final ActionResultDTO<T> deleteEntity(BusinessComponent bc)
Description copied from interface:ResponseService
Deletes an entity based on a business component- Specified by:
deleteEntity
in interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Overrides:
deleteEntity
in classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Parameters:
bc
- businessComponent- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
doUpdateEntity
protected final ActionResultDTO<T> doUpdateEntity(E entity, T data, BusinessComponent bc)
- Specified by:
doUpdateEntity
in classVersionAwareResponseService<T extends HistoricityDto,E extends HistoricityEntity>
-
update
protected abstract void update(E e, T dto, BusinessComponent bc)
-
copy
protected ActionResultDTO<T> copy(BusinessComponent bc, T dto)
-
getActions
public final Actions<T> getActions()
Description copied from interface:ResponseService
Returns actions for entity with conditions of their availability invoked by method getAvailableActions- Specified by:
getActions
in interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Overrides:
getActions
in classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- Returns:
AssociateResultDTO
class with DataResponseDTO and postactions
-
isActionCreateAvailable
protected boolean isActionCreateAvailable(BusinessComponent bc)
-
isActionSaveAvailable
protected boolean isActionSaveAvailable(BusinessComponent bc)
-
isActionDeleteAvailable
protected boolean isActionDeleteAvailable(BusinessComponent bc)
-
isActionCopyAvailable
protected boolean isActionCopyAvailable(BusinessComponent bc)
-
-