Class CollectionProcess

java.lang.Object
com.skava.search.process.ParentProcess
com.skava.search.process.CollectionProcess

@Component public class CollectionProcess extends ParentProcess

This class is the CollectionProcess. Collection process and validations is implemented in this class

  • Field Details

  • Constructor Details

  • Method Details

    • create

      public CollectionDO create(CollectionDO collectionDO)
      Parameters:
      collectionDO - An instance of CollectionDO. This object contains the collection and collection property request data to create it in database.
      Returns:
      An instance of CollectionDO.
    • findAll

      public PageableDO<CollectionDO> findAll(CollectionDO collectionDO)
      This function is used to find all collection from the given request. This function calls the search function internally.
      Parameters:
      collectionDO - collectionDO An instance of CollectionDO. This object contains the collection , collection property request data and filters/sort to find all the matched data.
      Returns:
      PageableDO<CollectionDO>
    • search

      public org.springframework.data.domain.Page<Collection> search(String filters, org.springframework.data.domain.Sort sort, int page, int size)
      This function is used to search the collection and find all collection based on filtering, pagination and sorting.
      Parameters:
      filters - This field is used to delete the particular data from SearchEngine which satisfies the filter condition . The fields presented in the filters should be same as it is in the SearchEngine for correct filtering . Sample Filtering Eg : {"filters":[{"field":"id","operation":"EQUALS","value":"1"}]}
      sort - It contains the parameters for sorting. Example Format : {"sort":[{"field":"id","direction":"ASC"}]}.
      page - This parameter will be available for all the services that supports pagination. It starts from value "1".
      size - This parameter will be available for all the services that supports pagination . This holds the max page size.
      Returns:
      Page<Collection>
    • findById

      public CollectionDO findById(CollectionDO collectionDO)
      This function is used to find collection by its id.
      Parameters:
      collectionDO - collectionDO An instance of CollectionDO. This object contains the collection and collection property request data to find the matched data.
      Returns:
      An instance of CollectionDO
    • update

      public CollectionDO update(CollectionDO collectionDO)
      This function is used to update the collection.
      Parameters:
      collectionDO - collectionDO An instance of CollectionDO. This object contains the collection and collection property request data to update it in the data base.
      Returns:
      An instance of CollectionDO
    • isCollectionAvailable

      public boolean isCollectionAvailable(long collectionid)