Class RatingHome
java.lang.Object
fr.paris.lutece.plugins.extend.modules.rating.business.RatingHome
-
Method Summary
Modifier and TypeMethodDescriptionstatic RatingInsert.findByHistoryExtenderIds(List<Long> listIdHistory) Find a listRatingby history ids listfindByPrimaryKey(int nIdRating) Load.findByResource(String strIdExtendableResource, String strExtendableResourceType) Select by resource.findByResourceAndRatingType(List<String> listIdsResource, String strExtendableResourceType, String ratingType) Find a listRatingfindRating(String strIdExtendableResource, String strExtendableResourceType, String ratingType, double value, String userGuid) load by primary keyFind the list of ratingstatic float[]findRatingValue(List<String> listIdResource, String strExtendableResourceType, String strRatingType) Find rating value of resource liststatic voidremove(int nIdRating) Delete.static voidremoveByIdExtenderHistory(long nIdHistory) Delete By Id extender History.static voidremoveByListExtenderHistory(List<Long> listIdExtenderHistory) Delete By list Id extender History.static voidremoveByResource(String strIdExtendableResource, String strExtendableResourceType) Delete by resource
-
Method Details
-
create
Insert.- Parameters:
rating- the rating
-
remove
public static void remove(int nIdRating) Delete.- Parameters:
nIdRating- the n id rating
-
removeByIdExtenderHistory
public static void removeByIdExtenderHistory(long nIdHistory) Delete By Id extender History.- Parameters:
nId- the Id extender History
-
removeByListExtenderHistory
Delete By list Id extender History.- Parameters:
listIdExtenderHistory- the list Id extender History
-
removeByResource
public static void removeByResource(String strIdExtendableResource, String strExtendableResourceType) Delete by resource- Parameters:
strIdExtendableResource- the Extendable resource idstrExtendableResourceType- the Extendable Resourcer type
-
findByPrimaryKey
Load.- Parameters:
nIdRating- the n id rating- Returns:
- the rating
-
findRating
public static Optional<Rating> findRating(String strIdExtendableResource, String strExtendableResourceType, String ratingType, double value, String userGuid) load by primary key- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typeratingType- the rating typevalue- the rating value- Returns:
- the rating
-
findByResource
public static List<Rating> findByResource(String strIdExtendableResource, String strExtendableResourceType) Select by resource.- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource type- Returns:
- the rating list
-
findByResourceAndRatingType
public static List<Rating> findByResourceAndRatingType(List<String> listIdsResource, String strExtendableResourceType, String ratingType) Find a listRating- Parameters:
listResource- the list of extender resourceidplugin- the plugin- Returns:
- the corresponding list
Rating
-
findByHistoryExtenderIds
Find a listRatingby history ids list- Parameters:
listIdHistory- the list of history idplugin- the plugin- Returns:
- the corresponding list
Rating
-
findRatingValue
public static float[] findRatingValue(List<String> listIdResource, String strExtendableResourceType, String strRatingType) Find rating value of resource list- Parameters:
listIdResource- the ids resource liststrExtendableResourceType- the resource typestrRatingType- the rating type- Returns:
- array of rating value
-
findRatingByFilter
Find the list of rating- Parameters:
filter- the RatingExtenderFilter- Returns:
- rating object list
-