Package org.cxbox.core.crudma.impl
Class VersionAwareResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>
- java.lang.Object
-
- org.cxbox.core.crudma.impl.AbstractResponseService<T,E>
-
- org.cxbox.core.crudma.impl.VersionAwareResponseService<T,E>
-
- All Implemented Interfaces:
ResponseService<T,E>
- Direct Known Subclasses:
HistoricityResponseService
public abstract class VersionAwareResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity> extends AbstractResponseService<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 VersionAwareResponseService(Class<T> typeOfDTO, Class<E> typeOfEntity, javax.persistence.metamodel.SingularAttribute<? super E,? extends BaseEntity> parentSpec, Class<? extends FieldMetaBuilder<T>> metaBuilder)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Ecreate(BusinessComponent bc)CreateResult<T>createEntity(BusinessComponent bc)Creates an entity based on a business componentprotected abstract CreateResult<T>doCreateEntity(E entity, BusinessComponent bc)protected ActionResultDTO<T>doPreview(E entity, T data, BusinessComponent bc)protected abstract ActionResultDTO<T>doUpdateEntity(E entity, T data, BusinessComponent bc)protected intgetLockTimeout()protected EloadEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)ActionResultDTO<T>preview(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)Updates an entity based on a business component by DTO Used in forceactive fieldsActionResultDTO<T>updateEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)Updates an entity based on a business component by DTO-
Methods inherited from class org.cxbox.core.crudma.impl.AbstractResponseService
associate, cast, count, count, count, deleteEntity, doAssociate, doGetOne, dtoListToResultPage, entitiesToDtos, entityListToResultPage, entityToDto, getActions, getAssociatedSsNames, getAvailableActions, getBcSpecification, getFetchGraph, getFetchGraphName, getFieldMetaBuilder, getLinkSpecification, getList, getList, getList, getOne, getOneAsEntity, getPageEntities, getParentSpecification, 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
-
-
-
-
Constructor Detail
-
VersionAwareResponseService
public VersionAwareResponseService(Class<T> typeOfDTO, Class<E> typeOfEntity, javax.persistence.metamodel.SingularAttribute<? super E,? extends BaseEntity> parentSpec, Class<? extends FieldMetaBuilder<T>> metaBuilder)
-
-
Method Detail
-
createEntity
public CreateResult<T> createEntity(BusinessComponent bc)
Description copied from interface:ResponseServiceCreates an entity based on a business component- Specified by:
createEntityin interfaceResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Overrides:
createEntityin classAbstractResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
create
protected E create(BusinessComponent bc)
-
updateEntity
public ActionResultDTO<T> updateEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)
Description copied from interface:ResponseServiceUpdates an entity based on a business component by DTO- Specified by:
updateEntityin interfaceResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Overrides:
updateEntityin classAbstractResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Parameters:
bc- businessComponentdata- information about entity, it's changed fields, errors- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
preview
public ActionResultDTO<T> preview(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)
Description copied from interface:ResponseServiceUpdates an entity based on a business component by DTO Used in forceactive fields- Specified by:
previewin interfaceResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Overrides:
previewin classAbstractResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>- Parameters:
bc- businessComponentdata- information about entity, it's changed fields, errors- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
loadEntity
protected E loadEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data)
- Overrides:
loadEntityin classAbstractResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>
-
doCreateEntity
protected abstract CreateResult<T> doCreateEntity(E entity, BusinessComponent bc)
-
doUpdateEntity
protected abstract ActionResultDTO<T> doUpdateEntity(E entity, T data, BusinessComponent bc)
-
doPreview
protected ActionResultDTO<T> doPreview(E entity, T data, BusinessComponent bc)
-
getLockTimeout
protected int getLockTimeout()
-
-