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>
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, parentSpec, preActionConditionHolderAssoc, preActionConditionHolderDataResponse, typeOfDTO, typeOfEntity -
Constructor Summary
ConstructorsConstructorDescriptionVersionAwareResponseService(Class<T> typeOfDTO, Class<E> typeOfEntity, jakarta.persistence.metamodel.SingularAttribute<? super E, ? extends BaseEntity> parentSpec, Class<? extends FieldMetaBuilder<T>> metaBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected ECreates 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 intprotected EloadEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) preview(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) Updates an entity based on a business component by DTO Used in forceactive fieldsupdateEntity(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO data) Updates an entity based on a business component by DTOMethods inherited from class org.cxbox.core.crudma.impl.AbstractResponseService
associate, cast, count, count, count, deleteEntity, doAssociate, doGetOne, dtoListToResultPage, entitiesToDtos, entityListToResultPage, entityToDto, getActions, getActionType, getAvailableActions, getBc, getFetchGraph, getFetchGraphName, getFieldMetaBuilder, getList, getList, getList, getMeta, getOne, getOneAsEntity, getPageEntities, getParentField, getParentSpecification, getPreActionsForSave, getSpecification, hasPersister, invokeAction, isDeferredCreationSupported, isExist, onCancel, setIfChanged, setIfChanged, setMappedIfChanged, setMappedIfChanged, unwrap, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cxbox.core.service.ResponseService
getTypeOfDTO, getTypeOfEntity
-
Constructor Details
-
VersionAwareResponseService
public VersionAwareResponseService(Class<T> typeOfDTO, Class<E> typeOfEntity, jakarta.persistence.metamodel.SingularAttribute<? super E, ? extends BaseEntity> parentSpec, Class<? extends FieldMetaBuilder<T>> metaBuilder) -
VersionAwareResponseService
public VersionAwareResponseService()
-
-
Method Details
-
createEntity
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
-
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
- Overrides:
loadEntityin classAbstractResponseService<T extends org.cxbox.api.data.dto.DataResponseDTO,E extends BaseEntity>
-
doCreateEntity
-
doUpdateEntity
-
doPreview
-
getLockTimeout
protected int getLockTimeout()
-