Package org.cxbox.core.crudma.impl.inner
Class UniversalCrudmaService<D extends org.cxbox.api.data.dto.UniversalDTO,E>
java.lang.Object
org.cxbox.core.crudma.impl.AbstractCrudmaService
org.cxbox.core.crudma.impl.inner.UniversalCrudmaService<D,E>
- All Implemented Interfaces:
Crudma
- Direct Known Subclasses:
TranslationCrudmaService
public abstract class UniversalCrudmaService<D extends org.cxbox.api.data.dto.UniversalDTO,E>
extends AbstractCrudmaService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDTOClass(List<jakarta.persistence.metamodel.Attribute<?, ?>> attributes) protected DextractNames(List<jakarta.persistence.metamodel.Attribute<?, ?>> attributes) get(BusinessComponent bc) Returns object based on a business componentorg.cxbox.api.data.ResultPage<D>Returns all matched objects based on a business componentprotected List<jakarta.persistence.metamodel.Attribute<?,?>> getAttributes(Class<? extends E> cls, Predicate<jakarta.persistence.metamodel.Attribute<?, ?>> predicate) protected List<jakarta.persistence.metamodel.Attribute<?,?>> protected abstract Collection<? extends E>protected abstract Eprotected List<jakarta.persistence.metamodel.Attribute<?,?>> getEntityAttributes(Class<? extends E> cls) protected EngineFieldsMetagetMeta(org.cxbox.api.data.BcIdentifier bc, RowMetaType type, D dataDto, boolean visibleOnly) Returns meta for entity based on a business componentReturns empty meta for entity based on a business componentgetMetaNew(BusinessComponent bc, CreateResult data) Returns new meta for entity based on a business componentinvokeAction(BusinessComponent bc, String actionName, Map<String, Object> data) Invokes action with given name, add preactions, loads or updates entity if necessaryprotected booleanprotected booleanprotected booleanprotected voidsetAttributes(E entity, D dto, List<jakarta.persistence.metamodel.Attribute<?, ?>> attributes) protected voidupdate(BusinessComponent bc, Map<String, Object> data) Updates an entity based on a business component by mapMethods inherited from class org.cxbox.core.crudma.impl.AbstractCrudmaService
associate, buildMeta, buildMeta, count, create, delete, getOnFieldUpdateMeta, preview
-
Field Details
-
jpaDao
-
responseFactory
-
-
Constructor Details
-
UniversalCrudmaService
public UniversalCrudmaService()
-
-
Method Details
-
getDtoClass
-
getEntityClass
-
entityToDto
-
update
Description copied from interface:CrudmaUpdates an entity based on a business component by map- Specified by:
updatein interfaceCrudma- Overrides:
updatein classAbstractCrudmaService- Parameters:
bc- businessComponentdata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
setAttributes
-
getMeta
Description copied from interface:CrudmaReturns meta for entity based on a business component- Specified by:
getMetain interfaceCrudma- Overrides:
getMetain classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getMeta
protected EngineFieldsMeta getMeta(org.cxbox.api.data.BcIdentifier bc, RowMetaType type, D dataDto, boolean visibleOnly) -
getMetaNew
Description copied from interface:CrudmaReturns new meta for entity based on a business component- Specified by:
getMetaNewin interfaceCrudma- Overrides:
getMetaNewin classAbstractCrudmaService- Parameters:
bc- businessComponentdata- class with DataResponseDTO and postactions- Returns:
MetaDTOclass with meta DTO and postactions
-
getMetaEmpty
Description copied from interface:CrudmaReturns empty meta for entity based on a business component- Specified by:
getMetaEmptyin interfaceCrudma- Overrides:
getMetaEmptyin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getActions
-
invokeAction
public ActionResultDTO invokeAction(BusinessComponent bc, String actionName, Map<String, Object> data) Description copied from interface:CrudmaInvokes action with given name, add preactions, loads or updates entity if necessary- Specified by:
invokeActionin interfaceCrudma- Overrides:
invokeActionin classAbstractCrudmaService- Parameters:
bc- businessComponentactionName- name of actiondata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
isSaveAvailable
-
isCreateAvailable
-
isDeleteAvailable
-
get
Description copied from interface:CrudmaReturns object based on a business component- Specified by:
getin interfaceCrudma- Overrides:
getin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
DataResponseDTOinformation about entity, it's changed fields, errors
-
getEntity
-
getAll
Description copied from interface:CrudmaReturns all matched objects based on a business component- Specified by:
getAllin interfaceCrudma- Overrides:
getAllin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
ResultPageclass with list of objects
-
getEntities
-
createDTOClass
-
getAttributes
-
getEntityAttributes
-
getIgnoredAttributes
-
getAttributes
-
getValues
-
setValues
-
extractNames
-