Package org.cxbox.core.crudma.impl.inner
Class AnySourceCrudmaService
java.lang.Object
org.cxbox.core.crudma.impl.AbstractCrudmaService
org.cxbox.core.crudma.impl.inner.AnySourceCrudmaService
- All Implemented Interfaces:
Crudma
-
Constructor Summary
Constructors -
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 componentorg.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 createResult) 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 mapMethods inherited from class org.cxbox.core.crudma.impl.AbstractCrudmaService
buildMeta, buildMeta
-
Constructor Details
-
AnySourceCrudmaService
public AnySourceCrudmaService()
-
-
Method Details
-
create
Description copied from interface:CrudmaCreates an entity based on a business component- Specified by:
createin interfaceCrudma- Overrides:
createin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
CreateResultclass with DataResponseDTO and postactions
-
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
-
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- Specified by:
getAllin interfaceCrudma- Overrides:
getAllin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
ResultPageclass with list of objects
-
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- Specified by:
previewin interfaceCrudma- Overrides:
previewin classAbstractCrudmaService- Parameters:
bc- businessComponentdata- information about entity- Returns:
PreviewResultclass with DataResponseDTO
-
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
-
delete
Description copied from interface:CrudmaDeletes an entity based on a business component- Specified by:
deletein interfaceCrudma- Overrides:
deletein classAbstractCrudmaService- Parameters:
bc- businessComponent- 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- Overrides:
associatein classAbstractCrudmaService- Parameters:
bc- businessComponentdata- information about an entity, whether the entity was associated- Returns:
AssociateResultDTOclass 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- Overrides:
invokeActionin classAbstractCrudmaService- Parameters:
bc- businessComponentactionName- name of actiondata- information about entity- Returns:
ActionResultDTOclass with DataResponseDTO and postactions
-
getMetaNew
Description copied from interface:CrudmaReturns new meta for entity based on a business component- Specified by:
getMetaNewin interfaceCrudma- Overrides:
getMetaNewin classAbstractCrudmaService- Parameters:
bc- businessComponentcreateResult- class with DataResponseDTO and postactions- Returns:
MetaDTOclass with meta DTO and postactions
-
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
-
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
-
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- Overrides:
getOnFieldUpdateMetain classAbstractCrudmaService- Parameters:
bc- businessComponentdto- information about entity, it's changed fields, errors- Returns:
MetaDTOclass with meta DTO and postactions
-
count
Description copied from interface:CrudmaReturns the number of matching entities- Specified by:
countin interfaceCrudma- Overrides:
countin classAbstractCrudmaService- Parameters:
bc- businessComponent- Returns:
- count
-