java.lang.Object
fr.paris.lutece.plugins.extend.modules.rating.business.RatingHome

public class RatingHome extends Object
  • Method Details

    • create

      public static Rating create(Rating rating)
      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

      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 id
      strExtendableResourceType - 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 resource
      strExtendableResourceType - the str extendable resource type
      ratingType - the rating type
      value - 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 resource
      strExtendableResourceType - the str extendable resource type
      Returns:
      the rating list
    • findByResourceAndRatingType

      public static List<Rating> findByResourceAndRatingType(List<String> listIdsResource, String strExtendableResourceType, String ratingType)
      Find a list Rating
      Parameters:
      listResource - the list of extender resourceid
      plugin - the plugin
      Returns:
      the corresponding list Rating
    • findByHistoryExtenderIds

      public static List<Rating> findByHistoryExtenderIds(List<Long> listIdHistory)
      Find a list Rating by history ids list
      Parameters:
      listIdHistory - the list of history id
      plugin - 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 list
      strExtendableResourceType - the resource type
      strRatingType - 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