Package org.cxbox.core.crudma
Interface Crudma
- All Known Implementing Classes:
AbstractCrudmaService,AnySourceCrudmaService,InnerCrudmaService,TranslationCrudmaService,UniversalCrudmaService
public interface Crudma
-
Method Summary
Modifier and TypeMethodDescriptionassociate(BusinessComponent bc, List<org.cxbox.api.data.dto.AssociateDTO> data) Creates links between entitieslongReturns the number of matching entitiesCreates an entity based on a business componentDeletes an entity based on a business componentorg.cxbox.api.data.dto.DataResponseDTOget(BusinessComponent bc) Returns object based on a business componentgetActions(BcDescription bcDescription) Recommended way to build actions.org.cxbox.api.data.ResultPage<? extends org.cxbox.api.data.dto.DataResponseDTO>Returns all matched objects based on a business componentReturns 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 componentgetOnFieldUpdateMeta(BusinessComponent bc, org.cxbox.api.data.dto.DataResponseDTO dto) Returns on-field-update 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 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 fieldsupdate(BusinessComponent bc, Map<String, Object> data) Updates an entity based on a business component by map
-
Method Details
-
get
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
Creates an entity based on a business component- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
preview
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
Updates an entity based on a business component by map- Parameters:
bc- businessComponentdata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
delete
Deletes an entity based on a business component- Parameters:
bc- businessComponent- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
invokeAction
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
Creates links between entities- Parameters:
data- information about an entity, whether the entity was associatedbc- businessComponent- Returns:
AssociateResultDTOclass with DataResponseDTO and postactions
-
getMetaNew
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
Returns meta for entity based on a business component- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getMetaEmpty
Returns empty meta for entity based on a business component- Parameters:
bc- businessComponent- Returns:
MetaDTOclass with meta DTO and postactions
-
getOnFieldUpdateMeta
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
Returns the number of matching entities- Parameters:
bc- businessComponent- Returns:
- count
-
getActions
Recommended way to build actions. Usually used in getMeta, getMetaNew, getMetaEmpty implicitly (but can be enriched with other actions not listed in getActions (from external systems for example), so potentially getActions does not return FULL list of actions)- Parameters:
bcDescription-- Returns:
-