Class RatingHome
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.modules.rating.business.RatingHome
-
public class RatingHome extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Ratingcreate(Rating rating)Insert.static java.util.List<Rating>findByHistoryExtenderIds(java.util.List<java.lang.Long> listIdHistory)Find a listRatingby history ids liststatic java.util.Optional<Rating>findByPrimaryKey(int nIdRating)Load.static java.util.List<Rating>findByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)Select by resource.static java.util.List<Rating>findByResourceAndRatingType(java.util.List<java.lang.String> listIdsResource, java.lang.String strExtendableResourceType, java.lang.String ratingType)Find a listRatingstatic java.util.Optional<Rating>findRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, java.lang.String ratingType, double value, java.lang.String userGuid)load by primary keystatic java.util.List<Rating>findRatingByFilter(RatingExtenderFilter filter)Find the list of ratingstatic float[]findRatingValue(java.util.List<java.lang.String> listIdResource, java.lang.String strExtendableResourceType, java.lang.String strRatingType)Find rating value of resource liststatic voidremove(int nIdRating)Delete.static voidremoveByIdExtenderHistory(long nIdHistory)Delete By Id extender History.static voidremoveByListExtenderHistory(java.util.List<java.lang.Long> listIdExtenderHistory)Delete By list Id extender History.static voidremoveByResource(java.lang.String strIdExtendableResource, java.lang.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(java.util.List<java.lang.Long> listIdExtenderHistory)
Delete By list Id extender History.- Parameters:
listIdExtenderHistory- the list Id extender History
-
removeByResource
public static void removeByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)Delete by resource- Parameters:
strIdExtendableResource- the Extendable resource idstrExtendableResourceType- the Extendable Resourcer type
-
findByPrimaryKey
public static java.util.Optional<Rating> findByPrimaryKey(int nIdRating)
Load.- Parameters:
nIdRating- the n id rating- Returns:
- the rating
-
findRating
public static java.util.Optional<Rating> findRating(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, java.lang.String ratingType, double value, java.lang.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 java.util.List<Rating> findByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
Select by resource.- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource type- Returns:
- the rating list
-
findByResourceAndRatingType
public static java.util.List<Rating> findByResourceAndRatingType(java.util.List<java.lang.String> listIdsResource, java.lang.String strExtendableResourceType, java.lang.String ratingType)
Find a listRating- Parameters:
listResource- the list of extender resourceidplugin- the plugin- Returns:
- the corresponding list
Rating
-
findByHistoryExtenderIds
public static java.util.List<Rating> findByHistoryExtenderIds(java.util.List<java.lang.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(java.util.List<java.lang.String> listIdResource, java.lang.String strExtendableResourceType, java.lang.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 java.util.List<Rating> findRatingByFilter(RatingExtenderFilter filter)
Find the list of rating- Parameters:
filter- the RatingExtenderFilter- Returns:
- rating object list
-
-