Interface ResponseService<T extends DataResponseDTO,​E extends BaseEntity>

    • Method Detail

      • getOne

        T getOne​(BusinessComponent bc)
        Returns object based on a business component
        Parameters:
        bc - businessComponent
        Returns:
        object
      • hasPersister

        boolean hasPersister()
        Determines whether the service interacts with an entity from the database
        Returns:
        true/false
      • getList

        ResultPage<T> getList​(BusinessComponent bc)
        Returns a list of matched objects based on a business component
        Parameters:
        bc - businessComponent
        Returns:
        list of matched objects
      • createEntity

        CreateResult<T> createEntity​(BusinessComponent bc)
        Creates an entity based on a business component
        Parameters:
        bc - businessComponent
        Returns:
        CreateResult class with DataResponseDTO and postactions
      • updateEntity

        ActionResultDTO<T> updateEntity​(BusinessComponent bc,
                                        DataResponseDTO data)
        Updates an entity based on a business component by DTO
        Parameters:
        bc - businessComponent
        data - information about entity, it's changed fields, errors
        Returns:
        ActionResultDTO class with DataResponseDTO and postactions
      • preview

        ActionResultDTO<T> preview​(BusinessComponent bc,
                                   DataResponseDTO data)
        Updates an entity based on a business component by DTO Used in forceactive fields
        Parameters:
        bc - businessComponent
        data - information about entity, it's changed fields, errors
        Returns:
        ActionResultDTO class with DataResponseDTO and postactions
      • invokeAction

        ActionResultDTO<T> invokeAction​(BusinessComponent bc,
                                        String actionName,
                                        DataResponseDTO 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, it's changed fields, errors
        Returns:
        ActionResultDTO class with DataResponseDTO and postactions
      • getAvailableActions

        ActionsDTO getAvailableActions​(RowMetaType metaType,
                                       DataResponseDTO data,
                                       BusinessComponent bc)
        Returns actions for entity with conditions of their availability invoke method getActions
        Parameters:
        metaType - type of meta
        data - information about entity, it's changed fields, errors
        bc - businessComponent
        Returns:
        AssociateResultDTO class with DataResponseDTO and postactions
      • getActions

        Actions<T> getActions()
        Returns actions for entity with conditions of their availability invoked by method getAvailableActions
        Returns:
        AssociateResultDTO class with DataResponseDTO and postactions
      • count

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

        Class<T> getTypeOfDTO()
        Returns the number of matching entities
        Returns:
        count
      • getTypeOfEntity

        Class<E> getTypeOfEntity()
        Returns the number of matching entities
        Returns:
        count
      • validate

        void validate​(BusinessComponent bc,
                      DataResponseDTO data)
        Validates the entry on save
        Parameters:
        bc - businessComponent
        data - information about entity, it's changed fields, errors
      • isDeferredCreationSupported

        boolean isDeferredCreationSupported​(BusinessComponent bc)
        Determines is deferred saving of new objects supported
        Parameters:
        bc - businessComponent