Package io.tesler.core.crudma.impl.inner
Class InnerCrudmaService
- java.lang.Object
-
- io.tesler.core.crudma.impl.AbstractCrudmaService
-
- io.tesler.core.crudma.impl.inner.InnerCrudmaService
-
- All Implemented Interfaces:
Crudma
@Service public class InnerCrudmaService extends AbstractCrudmaService
-
-
Constructor Summary
Constructors Constructor Description InnerCrudmaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssociateResultDTO
associate(BusinessComponent bc, List<AssociateDTO> data)
Creates links between entitieslong
count(BusinessComponent bc)
Returns the number of matching entitiesCreateResult
create(BusinessComponent bc)
Creates an entity based on a business componentActionResultDTO
delete(BusinessComponent bc)
Deletes an entity based on a business componentDataResponseDTO
get(BusinessComponent bc)
Returns object based on a business componentResultPage<? extends DataResponseDTO>
getAll(BusinessComponent bc)
Returns all matched objects based on a business componentMetaDTO
getMeta(BusinessComponent bc)
Returns meta for entity based on a business componentMetaDTO
getMetaEmpty(BusinessComponent bc)
Returns empty meta for entity based on a business componentMetaDTO
getMetaNew(BusinessComponent bc, CreateResult createResult)
Returns new meta for entity based on a business componentMetaDTO
getOnFieldUpdateMeta(BusinessComponent bc, DataResponseDTO dto)
Returns on-field-update meta for entity based on a business componentActionResultDTO
invokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)
Invokes action with given name, add preactions, loads or updates entity if necessaryPreviewResult
preview(BusinessComponent bc, Map<String,Object> data)
Updates an entity based on a business component by map Used in forceactive fieldsActionResultDTO
update(BusinessComponent bc, Map<String,Object> data)
Updates an entity based on a business component by map-
Methods inherited from class io.tesler.core.crudma.impl.AbstractCrudmaService
buildMeta, buildMeta
-
-
-
-
Method Detail
-
create
public CreateResult create(BusinessComponent bc)
Description copied from interface:Crudma
Creates an entity based on a business component- Specified by:
create
in interfaceCrudma
- Overrides:
create
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
CreateResult
class with DataResponseDTO and postactions
-
get
public DataResponseDTO get(BusinessComponent bc)
Description copied from interface:Crudma
Returns object based on a business component- Specified by:
get
in interfaceCrudma
- Overrides:
get
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
DataResponseDTO
information about entity, it's changed fields, errors
-
getAll
public ResultPage<? extends DataResponseDTO> getAll(BusinessComponent bc)
Description copied from interface:Crudma
Returns all matched objects based on a business component- Specified by:
getAll
in interfaceCrudma
- Overrides:
getAll
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
ResultPage
class with list of objects
-
preview
public PreviewResult preview(BusinessComponent bc, Map<String,Object> data)
Description copied from interface:Crudma
Updates an entity based on a business component by map Used in forceactive fields- Specified by:
preview
in interfaceCrudma
- Overrides:
preview
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentdata
- information about entity- Returns:
PreviewResult
class with DataResponseDTO
-
update
public ActionResultDTO update(BusinessComponent bc, Map<String,Object> data)
Description copied from interface:Crudma
Updates an entity based on a business component by map- Specified by:
update
in interfaceCrudma
- Overrides:
update
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentdata
- information about entity- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
delete
public ActionResultDTO delete(BusinessComponent bc)
Description copied from interface:Crudma
Deletes an entity based on a business component- Specified by:
delete
in interfaceCrudma
- Overrides:
delete
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
associate
public AssociateResultDTO associate(BusinessComponent bc, List<AssociateDTO> data)
Description copied from interface:Crudma
Creates links between entities- Specified by:
associate
in interfaceCrudma
- Overrides:
associate
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentdata
- information about an entity, whether the entity was associated- Returns:
AssociateResultDTO
class with DataResponseDTO and postactions
-
invokeAction
public ActionResultDTO invokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)
Description copied from interface:Crudma
Invokes action with given name, add preactions, loads or updates entity if necessary- Specified by:
invokeAction
in interfaceCrudma
- Overrides:
invokeAction
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentactionName
- name of actiondata
- information about entity- Returns:
ActionResultDTO
class with DataResponseDTO and postactions
-
getMetaNew
public MetaDTO getMetaNew(BusinessComponent bc, CreateResult createResult)
Description copied from interface:Crudma
Returns new meta for entity based on a business component- Specified by:
getMetaNew
in interfaceCrudma
- Overrides:
getMetaNew
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentcreateResult
- class with DataResponseDTO and postactions- Returns:
MetaDTO
class with meta DTO and postactions
-
getMeta
public MetaDTO getMeta(BusinessComponent bc)
Description copied from interface:Crudma
Returns meta for entity based on a business component- Specified by:
getMeta
in interfaceCrudma
- Overrides:
getMeta
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
MetaDTO
class with meta DTO and postactions
-
getMetaEmpty
public MetaDTO getMetaEmpty(BusinessComponent bc)
Description copied from interface:Crudma
Returns empty meta for entity based on a business component- Specified by:
getMetaEmpty
in interfaceCrudma
- Overrides:
getMetaEmpty
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
MetaDTO
class with meta DTO and postactions
-
getOnFieldUpdateMeta
public MetaDTO getOnFieldUpdateMeta(BusinessComponent bc, DataResponseDTO dto)
Description copied from interface:Crudma
Returns on-field-update meta for entity based on a business component- Specified by:
getOnFieldUpdateMeta
in interfaceCrudma
- Overrides:
getOnFieldUpdateMeta
in classAbstractCrudmaService
- Parameters:
bc
- businessComponentdto
- information about entity, it's changed fields, errors- Returns:
MetaDTO
class with meta DTO and postactions
-
count
public long count(BusinessComponent bc)
Description copied from interface:Crudma
Returns the number of matching entities- Specified by:
count
in interfaceCrudma
- Overrides:
count
in classAbstractCrudmaService
- Parameters:
bc
- businessComponent- Returns:
- count
-
-