Class RatingHome
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.modules.rating.business.RatingHome
-
public class RatingHome extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Ratingcreate(Rating rating)Insert.static List<Rating>findByHistoryExtenderIds(List<Long> listIdHistory)Find a listRatingby history ids liststatic Optional<Rating>findByPrimaryKey(int nIdRating)Load.static List<Rating>findByResource(String strIdExtendableResource, String strExtendableResourceType)Select by resource.static List<Rating>findByResourceAndRatingType(List<String> listIdsResource, String strExtendableResourceType, String ratingType)Find a listRatingstatic Optional<Rating>findRating(String strIdExtendableResource, String strExtendableResourceType, String ratingType, double value, String userGuid)load by primary keystatic List<Rating>findRatingByFilter(RatingExtenderFilter filter)Find 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 Detail
-
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
public static void removeByListExtenderHistory(List<Long> listIdExtenderHistory)
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
public static Optional<Rating> findByPrimaryKey(int nIdRating)
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
public static List<Rating> findByHistoryExtenderIds(List<Long> listIdHistory)
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
public static List<Rating> findRatingByFilter(RatingExtenderFilter filter)
Find the list of rating- Parameters:
filter- the RatingExtenderFilter- Returns:
- rating object list
-
-