Class RatingSummaryProcess
java.lang.Object
com.skava.ratingandreviews.process.RatingSummaryProcess
Class RatingSummaryProcess
This Class provides the basic operation of the RatingSummary like creating ,findAll,search .
- Author:
- Infosys Equinox
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRatingSummaryProcess
(RatingSummaryRepository ratingSummaryRepository, RatingSummaryFactory ratingSummaryFactory, CollectionProcess collectionProcess) -
Method Summary
Modifier and TypeMethodDescriptioncreateRatingSummary
(RatingSummaryDomain ratingsummaryDomain) method createRatingSummary This method is used to create RatingSummary with the help of the collectionid which is derived from the RatingdummaryDomain passed to it.findAll
(RatingSummaryDomain ratingsummaryDomain) method findAll This method is used to find all the Rating summary which satisifies the CollectionId,Filters,sort which are derived from the RatingSummaryDomain.org.springframework.data.domain.Page<RatingSummaryEntity>
This function is used to search the collection and find all collection based on filtering, pagination and sorting.
-
Field Details
-
PAGE_CONSTANT
public static final int PAGE_CONSTANTpage Constant- See Also:
-
-
Constructor Details
-
RatingSummaryProcess
@Autowired public RatingSummaryProcess(RatingSummaryRepository ratingSummaryRepository, RatingSummaryFactory ratingSummaryFactory, CollectionProcess collectionProcess)
-
-
Method Details
-
createRatingSummary
method createRatingSummary This method is used to create RatingSummary with the help of the collectionid which is derived from the RatingdummaryDomain passed to it.- Parameters:
ratingsummaryDomain
- Holds the collectionId for which RatingSummary is Created.- Returns:
- RatingSummaryDomain The created RatingSummary is returned in the type of RatingSummaryDomain.
-
findAll
method findAll This method is used to find all the Rating summary which satisifies the CollectionId,Filters,sort which are derived from the RatingSummaryDomain.- Parameters:
ratingsummaryDomain
- Holds the collectionId,Filters,Sort to find the RatingSummary.- Returns:
- PageableDo Holds Page data consists of page, size, count and total count of the response data.
-
search
public org.springframework.data.domain.Page<RatingSummaryEntity> 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
>
-