Class CollectionProcess

java.lang.Object
com.skava.ratingandreviews.collection.process.CollectionProcess

@Component public class CollectionProcess extends Object

The Class CollectionProcess.

This class defines all the process that are executed for the completion of the service requests on Collection.

Since:
10.10.2018
Version:
8.0
Author:
Infosys Equinox
  • Field Details

  • Constructor Details

  • Method Details

    • findById

      public CollectionDomain findById(Long collectionId)

      findById

      Find Collection Domain by Collection Identifier This method is used for authorization and all service APIs to determine if such a collection exists.

      Parameters:
      collectionId - The collection identifier
      Returns:
      The collection Domain model
    • findById

      public CollectionDomain findById(CollectionDomain collectionDO)

      FindById

      Find Collection Domain by collection identifier and business identifier This method is invoked to find a collection by its identifier and business identifier. This will load both the collection and its properties and returns the CollectionDomain model.

      Parameters:
      collectionDO - The Collection domain model
      Returns:
      An instance of CollectionDomain
    • create

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

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

      public org.springframework.data.domain.Page<CollectionEntity> 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 solr which satisfies the filter condition . The fields presented in the filters should be same as it is in the solr 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<CollectionEntity>
    • update

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