Package org.cxbox.core.crudma
Interface Crudma
-
- All Known Implementing Classes:
AbstractCrudmaService,BcCrudmaService,InnerCrudmaService,TranslationCrudmaService,UniversalCrudmaService
public interface Crudma
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AssociateResultDTOassociate(BusinessComponent bc, List<org.cxbox.api.data.dto.AssociateDTO> data)Creates links between entitieslongcount(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
org.cxbox.api.data.dto.DataResponseDTO get(BusinessComponent bc)
Returns object based on a business component- Parameters:
bc- businessComponent- Returns:
DataResponseDTOinformation about entity, it's changed fields, errors
-
getAll
org.cxbox.api.data.ResultPage<? extends org.cxbox.api.data.dto.DataResponseDTO> getAll(BusinessComponent bc)
Returns all matched objects based on a business component- Parameters:
bc- businessComponent- Returns:
ResultPageclass with list of objects
-
create
CreateResult create(BusinessComponent bc)
Creates an entity based on a business component- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
preview
org.cxbox.api.data.dto.rowmeta.PreviewResult preview(BusinessComponent bc, Map<String,Object> data)
Updates an entity based on a business component by map Used in forceactive fields- Parameters:
bc- businessComponentdata- information about entity- Returns:
PreviewResultclass with DataResponseDTO
-
update
ActionResultDTO update(BusinessComponent bc, Map<String,Object> data)
Updates an entity based on a business component by map- Parameters:
bc- businessComponentdata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
delete
ActionResultDTO delete(BusinessComponent bc)
Deletes an entity based on a business component- Parameters:
bc- businessComponent- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
invokeAction
ActionResultDTO invokeAction(BusinessComponent bc, String actionName, Map<String,Object> data)
Invokes action with given name, add preactions, loads or updates entity if necessary- Parameters:
bc- businessComponentactionName- name of actiondata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
associate
AssociateResultDTO associate(BusinessComponent bc, List<org.cxbox.api.data.dto.AssociateDTO> data)
Creates links between entities- Parameters:
data- information about an entity, whether the entity was associatedbc- businessComponent- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
getMetaNew
MetaDTO getMetaNew(BusinessComponent bc, CreateResult data)
Returns new meta for entity based on a business component- Parameters:
data- class with DataResponseDTO and postactionsbc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getMeta
MetaDTO getMeta(BusinessComponent bc)
Returns meta for entity based on a business component- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getMetaEmpty
MetaDTO getMetaEmpty(BusinessComponent bc)
Returns empty meta for entity based on a business component- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getOnFieldUpdateMeta
MetaDTO getOnFieldUpdateMeta(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO dto)
Returns on-field-update meta for entity based on a business component- Parameters:
bc- businessComponentdto- information about entity, it's changed fields, errors- Returns:
MetaDTOclass with meta DTO and postactions
-
count
long count(BusinessComponent bc)
Returns the number of matching entities- Parameters:
bc- businessComponent- Returns:
- count
-
-