Package org.cxbox.core.crudma.impl
Class HistoricityResponseService<T extends HistoricityDto,E extends HistoricityEntity>
- java.lang.Object
-
- org.cxbox.core.crudma.impl.AbstractResponseService<T,E>
-
- org.cxbox.core.crudma.impl.VersionAwareResponseService<T,E>
-
- org.cxbox.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 org.cxbox.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 EcopyEntity(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 getAvailableActionsorg.cxbox.api.data.ResultPage<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 booleanisActionCopyAvailable(BusinessComponent bc)protected booleanisActionCreateAvailable(BusinessComponent bc)protected booleanisActionDeleteAvailable(BusinessComponent bc)protected booleanisActionSaveAvailable(BusinessComponent bc)protected abstract voidupdate(E e, T dto, BusinessComponent bc)-
Methods inherited from class org.cxbox.core.crudma.impl.VersionAwareResponseService
create, createEntity, doPreview, getLockTimeout, loadEntity, preview, updateEntity
-
Methods inherited from class org.cxbox.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, setIfChanged, setIfChanged, setMappedIfChanged, setMappedIfChanged, unwrap, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.cxbox.core.service.ResponseService
getTypeOfDTO, getTypeOfEntity
-
-
-
-
Method Detail
-
getList
public final org.cxbox.api.data.ResultPage<T> getList(BusinessComponent bc)
Description copied from interface:ResponseServiceReturns a list of matched objects based on a business component- Specified by:
getListin interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>- Overrides:
getListin 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:
getParentSpecificationin classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>
-
doCreateEntity
protected final CreateResult<T> doCreateEntity(E entity, BusinessComponent bc)
- Specified by:
doCreateEntityin classVersionAwareResponseService<T extends HistoricityDto,E extends HistoricityEntity>
-
deleteEntity
public final ActionResultDTO<T> deleteEntity(BusinessComponent bc)
Description copied from interface:ResponseServiceDeletes an entity based on a business component- Specified by:
deleteEntityin interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>- Overrides:
deleteEntityin classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>- Parameters:
bc- businessComponent- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
doUpdateEntity
protected final ActionResultDTO<T> doUpdateEntity(E entity, T data, BusinessComponent bc)
- Specified by:
doUpdateEntityin 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:ResponseServiceReturns actions for entity with conditions of their availability invoked by method getAvailableActions- Specified by:
getActionsin interfaceResponseService<T extends HistoricityDto,E extends HistoricityEntity>- Overrides:
getActionsin classAbstractResponseService<T extends HistoricityDto,E extends HistoricityEntity>- Returns:
AssociateResultDTOclass 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)
-
-