Class RatingReviewPreferenceProcess
java.lang.Object
com.skava.ratingandreviews.process.RatingReviewPreferenceProcess
Class RatingReviewPreferenceProcess
this class provides the basic opertaions in RatingReviewPreferance like create RatingReviewPreferance, find RatingReviewPreferancebyId,findRatingReviewPreferancebbyIdanduserId,deleteRatingReviewPreferancebyId, updateRatingReviewPreferance,findAll,search.
- Author:
- Infosys Equinox
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected jakarta.persistence.EntityManager
static final int
page_constant -
Constructor Summary
ConstructorsConstructorDescriptionRatingReviewPreferenceProcess
(RatingsReviewsRepository ratingreviewPreferenceRepository, RatingReviewFactory ratingReviewPreferenceFactory, CollectionProcess collectionProcess, RatingAggregation ratingAggregation, com.skava.core.auth.AuthTokenHandler authTokenHandler, jakarta.persistence.EntityManager entityManager) -
Method Summary
Modifier and TypeMethodDescriptioncreateRatingReviewPreference
(RatingReviewDomain ratingReviewPreferenceDomain) method createRatingReviewPreference This method is used to create a RatingReviewPreferance with the help of collection id and userPreferenceId which are derived from the ratingReviewPreferenceDomain which is passed as a argument to it.void
deleteRatingReviewPreferenceById
(long userPreferenceId, long collectionid) method deleteRatingReviewPreferenceById This method is used to delete the RatingReviewPreferance with the help of USerID and CollectionId passed to it as argument.findAll
(RatingReviewDomain ratingreviewDomain, boolean skipTotalCount) method findAll This method is used to find RatingReviewDomain with the help of filters,collectionID,sort,Page,size which are derived from the RatingReviewdomain passed as argument to it.findRatingReviewPreferenceById
(long userPreferenceId, long collectionid) method findRatingReviewPreferenceById This method is used to find the RatingReviewPreferance with the help od collectionId and UserPRefaranceTd passed to it as arguments.findRatingReviewPreferenceByIdAnduserId
(long id, long collectionid, String userId) method findRatingReviewPreferenceByIdAnduserId This method is used to find the RatingReviewPreferance with the help of id, collectionId,userId which is passed to it as a argument.org.springframework.data.domain.Page<RatingsReviewsEntity>
method search This method is used to search the page of the RatingReviewEntity with the help of filters,sort,page,size passed to it as argument.searchForSkipCount
(String filters, org.springframework.data.domain.Sort sort, int page, int size) Search for skip total count.updateRatingReviewPreference
(RatingReviewDomain ratingReviewPreferenceDomain, long userPreferenceId, long collectionid, String storeId, String authToken) method updateRatingReviewPreference This method is used to update the RatingReviewPreferance with the help of RatingReviewPreferanceDomain,UserPreferanceId, collectionId,storeId,authtoken that are passed as argument to it.static <T> com.querydsl.core.types.Expression<T>
useParamForSort
(String param)
-
Field Details
-
PAGE_CONSTANT
public static final int PAGE_CONSTANTpage_constant- See Also:
-
entityManager
protected jakarta.persistence.EntityManager entityManager
-
-
Constructor Details
-
RatingReviewPreferenceProcess
@Autowired public RatingReviewPreferenceProcess(RatingsReviewsRepository ratingreviewPreferenceRepository, RatingReviewFactory ratingReviewPreferenceFactory, CollectionProcess collectionProcess, RatingAggregation ratingAggregation, com.skava.core.auth.AuthTokenHandler authTokenHandler, jakarta.persistence.EntityManager entityManager)
-
-
Method Details
-
createRatingReviewPreference
public RatingReviewDomain createRatingReviewPreference(RatingReviewDomain ratingReviewPreferenceDomain) method createRatingReviewPreference This method is used to create a RatingReviewPreferance with the help of collection id and userPreferenceId which are derived from the ratingReviewPreferenceDomain which is passed as a argument to it.- Parameters:
ratingReviewPreferenceDomain
- This parameter is used here to get the collection id and userPreferanceId which is used to create RatingReviewPreferance.- Returns:
- RatingReviewDomain The created RatingReviewPreferance is returned in the type of RatingReviewDomain.
-
findRatingReviewPreferenceById
method findRatingReviewPreferenceById This method is used to find the RatingReviewPreferance with the help od collectionId and UserPRefaranceTd passed to it as arguments.- Parameters:
userPreferenceId
- Holds the identifier of the UserPreferance.collectionid
- Holds the Identifier for userPreferance.- Returns:
- RatingReviewDomain The found RatingReviewPreferance is returned in the type of RatingReviewDomain.
-
findRatingReviewPreferenceByIdAnduserId
public RatingReviewDomain findRatingReviewPreferenceByIdAnduserId(long id, long collectionid, String userId) method findRatingReviewPreferenceByIdAnduserId This method is used to find the RatingReviewPreferance with the help of id, collectionId,userId which is passed to it as a argument.- Parameters:
id
- Holds the Identifier for the UerPreferance.collectionid
- Holds the Identifier of collection.userId
- Holds the Identifier of the User for UserPreferance.- Returns:
- RatingReviewDomain The found RatingReviewPReferance is returned in the type of RatingReviewDomain.
-
deleteRatingReviewPreferenceById
public void deleteRatingReviewPreferenceById(long userPreferenceId, long collectionid) method deleteRatingReviewPreferenceById This method is used to delete the RatingReviewPreferance with the help of USerID and CollectionId passed to it as argument.- Parameters:
userPreferenceId
- Holds the Identifier for the UserPreferance.collectionid
- Holds the Idetifier of the collectiion for Userpreferance.
-
updateRatingReviewPreference
public RatingReviewDomain updateRatingReviewPreference(RatingReviewDomain ratingReviewPreferenceDomain, long userPreferenceId, long collectionid, String storeId, String authToken) method updateRatingReviewPreference This method is used to update the RatingReviewPreferance with the help of RatingReviewPreferanceDomain,UserPreferanceId, collectionId,storeId,authtoken that are passed as argument to it.- Parameters:
ratingReviewPreferenceDomain
- This parameter is used to update the RatingReviewPreferance.userPreferenceId
- Holds the Identifier of the UserPreferance.collectionid
- Holds the Identifier for the userPrefernace.storeId
- Holds the Identifier of store of the microsrvice.authToken
- Holds the token for UserPreferance- Returns:
- RatingReviewDomain The updated RatingReviewPRefernace is returned of type RatingReviewDomain.
-
findAll
public PageableDO<RatingReviewDomain> findAll(RatingReviewDomain ratingreviewDomain, boolean skipTotalCount) method findAll This method is used to find RatingReviewDomain with the help of filters,collectionID,sort,Page,size which are derived from the RatingReviewdomain passed as argument to it.- Parameters:
ratingreviewDomain
- holds the filters,collectionID,sort,Page,size to find the RatingReviewDomain.- Returns:
- PageableDo Holds Page data consists of page, size, count and total count of the response data
-
search
public org.springframework.data.domain.Page<RatingsReviewsEntity> search(String filters, org.springframework.data.domain.Sort sort, int page, int size) method search This method is used to search the page of the RatingReviewEntity with the help of filters,sort,page,size passed to it as argument.- Parameters:
filters
- Holds the information about the filters.sort
- Holds the information about the sort.page
- Holds the informations about the page.size
- Holds the information about the size.- Returns:
- page Holds the informations about the page of RatingReviewEntity.
-
searchForSkipCount
public List<RatingsReviewsEntity> searchForSkipCount(String filters, org.springframework.data.domain.Sort sort, int page, int size) Search for skip total count.- Parameters:
filters
- the filters for searchsort
- the sort- Returns:
- the list of RatingsReviewsEntity
-
useParamForSort
- Type Parameters:
T
- the generic type- Parameters:
param
- for sorting- Returns:
-