Package org.cxbox.core.crudma.impl
Class AbstractCrudmaService
- java.lang.Object
-
- org.cxbox.core.crudma.impl.AbstractCrudmaService
-
- All Implemented Interfaces:
Crudma
- Direct Known Subclasses:
BcCrudmaService,InnerCrudmaService,UniversalCrudmaService
public abstract class AbstractCrudmaService extends Object implements Crudma
-
-
Constructor Summary
Constructors Constructor Description AbstractCrudmaService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssociateResultDTOassociate(BusinessComponent bc, List<org.cxbox.api.data.dto.AssociateDTO> data)Creates links between entitiesprotected MetaDTObuildMeta(List<org.cxbox.api.data.dto.rowmeta.FieldDTO> fields)protected MetaDTObuildMeta(List<org.cxbox.api.data.dto.rowmeta.FieldDTO> fields, ActionsDTO actions)longcount(BusinessComponent bc)Returns the number of matching entitiesCreateResultcreate(BusinessComponent bc)Creates an entity based on a business componentActionResultDTOdelete(BusinessComponent bc)Deletes an entity based on a business componentorg.cxbox.api.data.dto.DataResponseDTOget(BusinessComponent bc)Returns object based on a business componentorg.cxbox.api.data.ResultPage<? extends org.cxbox.api.data.dto.DataResponseDTO>getAll(BusinessComponent bc)Returns all matched objects based on a business componentMetaDTOgetMeta(BusinessComponent bc)Returns meta for entity based on a business componentMetaDTOgetMetaEmpty(BusinessComponent bc)Returns empty meta for entity based on a business componentMetaDTOgetMetaNew(BusinessComponent bc, CreateResult data)Returns new meta for entity based on a business componentMetaDTOgetOnFieldUpdateMeta(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO dto)Returns on-field-update meta for entity based on a business componentActionResultDTOinvokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)Invokes action with given name, add preactions, loads or updates entity if necessaryorg.cxbox.api.data.dto.rowmeta.PreviewResultpreview(BusinessComponent bc, Map<String,Object> data)Updates an entity based on a business component by map Used in forceactive fieldsActionResultDTOupdate(BusinessComponent bc, Map<String,Object> data)Updates an entity based on a business component by map
-
-
-
Method Detail
-
get
public org.cxbox.api.data.dto.DataResponseDTO get(BusinessComponent bc)
Description copied from interface:CrudmaReturns object based on a business component
-
getAll
public org.cxbox.api.data.ResultPage<? extends org.cxbox.api.data.dto.DataResponseDTO> getAll(BusinessComponent bc)
Description copied from interface:CrudmaReturns all matched objects based on a business component
-
create
public CreateResult create(BusinessComponent bc)
Description copied from interface:CrudmaCreates an entity based on a business component- Specified by:
createin interfaceCrudma- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
preview
public org.cxbox.api.data.dto.rowmeta.PreviewResult preview(BusinessComponent bc, Map<String,Object> data)
Description copied from interface:CrudmaUpdates an entity based on a business component by map Used in forceactive fields
-
update
public ActionResultDTO update(BusinessComponent bc, Map<String,Object> data)
Description copied from interface:CrudmaUpdates an entity based on a business component by map- Specified by:
updatein interfaceCrudma- Parameters:
bc- businessComponentdata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
delete
public ActionResultDTO delete(BusinessComponent bc)
Description copied from interface:CrudmaDeletes an entity based on a business component- Specified by:
deletein interfaceCrudma- Parameters:
bc- businessComponent- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
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- Parameters:
bc- businessComponentactionName- name of actiondata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
associate
public AssociateResultDTO associate(BusinessComponent bc, List<org.cxbox.api.data.dto.AssociateDTO> data)
Description copied from interface:CrudmaCreates links between entities- Specified by:
associatein interfaceCrudma- Parameters:
bc- businessComponentdata- information about an entity, whether the entity was associated- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
getMetaNew
public MetaDTO getMetaNew(BusinessComponent bc, CreateResult data)
Description copied from interface:CrudmaReturns new meta for entity based on a business component- Specified by:
getMetaNewin interfaceCrudma- Parameters:
bc- businessComponentdata- class with DataResponseDTO and postactions- Returns:
MetaDTOclass with meta DTO and postactions
-
getMeta
public MetaDTO getMeta(BusinessComponent bc)
Description copied from interface:CrudmaReturns meta for entity based on a business component
-
getMetaEmpty
public MetaDTO getMetaEmpty(BusinessComponent bc)
Description copied from interface:CrudmaReturns empty meta for entity based on a business component- Specified by:
getMetaEmptyin interfaceCrudma- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getOnFieldUpdateMeta
public MetaDTO getOnFieldUpdateMeta(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO dto)
Description copied from interface:CrudmaReturns on-field-update meta for entity based on a business component- Specified by:
getOnFieldUpdateMetain interfaceCrudma- Parameters:
bc- businessComponentdto- information about entity, it's changed fields, errors- Returns:
MetaDTOclass with meta DTO and postactions
-
count
public long count(BusinessComponent bc)
Description copied from interface:CrudmaReturns the number of matching entities
-
buildMeta
protected MetaDTO buildMeta(List<org.cxbox.api.data.dto.rowmeta.FieldDTO> fields, ActionsDTO actions)
-
-