Interface Crudma

All Known Implementing Classes:
AbstractCrudmaService, InnerCrudmaService, TranslationCrudmaService, UniversalCrudmaService

public interface Crudma
  • Method Details

    • get

      org.cxbox.api.data.dto.DataResponseDTO get(BusinessComponent bc)
      Returns object based on a business component
      Parameters:
      bc - businessComponent
      Returns:
      DataResponseDTO information 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:
      ResultPage class with list of objects
    • create

      Creates an entity based on a business component
      Parameters:
      bc - businessComponent
      Returns:
      CreateResult class 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 - businessComponent
      data - information about entity
      Returns:
      PreviewResult class with DataResponseDTO
    • update

      Updates an entity based on a business component by map
      Parameters:
      bc - businessComponent
      data - information about entity
      Returns:
      ActionResultDTO class with DataResponseDTO and postactions
    • delete

      Deletes an entity based on a business component
      Parameters:
      bc - businessComponent
      Returns:
      ActionResultDTO class 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 - businessComponent
      actionName - name of action
      data - information about entity
      Returns:
      ActionResultDTO class 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 associated
      bc - businessComponent
      Returns:
      AssociateResultDTO class 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 postactions
      bc - businessComponent
      Returns:
      MetaDTO class with meta DTO and postactions
    • getMeta

      Returns meta for entity based on a business component
      Parameters:
      bc - businessComponent
      Returns:
      MetaDTO class with meta DTO and postactions
    • getMetaEmpty

      MetaDTO getMetaEmpty(BusinessComponent bc)
      Returns empty meta for entity based on a business component
      Parameters:
      bc - businessComponent
      Returns:
      MetaDTO class 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 - businessComponent
      dto - information about entity, it's changed fields, errors
      Returns:
      MetaDTO class with meta DTO and postactions
    • count

      long count(BusinessComponent bc)
      Returns the number of matching entities
      Parameters:
      bc - businessComponent
      Returns:
      count