Class RatingDAO

  • All Implemented Interfaces:
    IRatingDAO

    public class RatingDAO
    extends java.lang.Object
    implements IRatingDAO
    This class provides Data Access methods for Rating objects.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CONSTANT_AND  
      static java.lang.String CONSTANT_WHERE  
    • Constructor Summary

      Constructors 
      Constructor Description
      RatingDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete.
      void deleteByIdExtenderHistory​(long nIdExtenderHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete By Id extender History.
      void deleteByListExtenderHistory​(java.util.List<java.lang.Long> listIdExtenderHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete By list Id extender History.
      void deleteByResource​(java.lang.String strIdResource, java.lang.String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Delete by resource
      Rating findByHistoryExtenderId​(long lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a Rating
      java.util.List<Rating> findByHistoryExtenderIds​(java.util.List<java.lang.Long> lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a list Rating
      java.util.List<Rating> findByResourceAndRatingType​(java.util.List<java.lang.String> listIdResource, java.lang.String strExtendableResourceType, java.lang.String strRatingType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Find a list Rating
      void insert​(Rating rating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Insert.
      java.util.Optional<Rating> load​(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      load by primary key
      java.util.Optional<Rating> load​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, java.lang.String ratingType, double value, java.lang.String userGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      load by primary key
      java.util.List<Rating> loadByResource​(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
      Select by resource.
      java.util.List<Rating> selectRatingByFilter​(RatingExtenderFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      float[] selectRatingValue​(java.util.List<java.lang.String> listIdResource, java.lang.String strExtendableResourceType, java.lang.String strRatingType, fr.paris.lutece.portal.service.plugin.Plugin plugin)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RatingDAO

        public RatingDAO()
    • Method Detail

      • insert

        public void insert​(Rating rating,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Insert.
        Specified by:
        insert in interface IRatingDAO
        Parameters:
        rating - the rating
        plugin - the plugin
      • loadByResource

        public java.util.List<Rating> loadByResource​(java.lang.String strIdExtendableResource,
                                                     java.lang.String strExtendableResourceType,
                                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Select by resource.
        Specified by:
        loadByResource in interface IRatingDAO
        Parameters:
        strIdExtendableResource - the str id extendable resource
        strExtendableResourceType - the str extendable resource type
        plugin - the plugin
        Returns:
        the rating list
      • findByHistoryExtenderId

        public Rating findByHistoryExtenderId​(long lIdHistoryExtenderId,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IRatingDAO
        Find a Rating
        Specified by:
        findByHistoryExtenderId in interface IRatingDAO
        Parameters:
        lIdHistoryExtenderId - the extender id
        plugin - the plugin
        Returns:
        the corresponding Rating
      • load

        public java.util.Optional<Rating> load​(int nIdRating,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        load by primary key
        Specified by:
        load in interface IRatingDAO
        Parameters:
        nIdRating - the rating id
        plugin - the plugin
        Returns:
        the corresponding Rating
      • load

        public java.util.Optional<Rating> load​(java.lang.String strIdExtendableResource,
                                               java.lang.String strExtendableResourceType,
                                               java.lang.String ratingType,
                                               double value,
                                               java.lang.String userGuid,
                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        load by primary key
        Specified by:
        load in interface IRatingDAO
        Parameters:
        strIdExtendableResource - the str id extendable resource
        strExtendableResourceType - the str extendable resource type
        ratingType - the rating type
        value - the rating value
        plugin - the plugin
        Returns:
        the rating
      • delete

        public void delete​(int nIdRating,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete.
        Specified by:
        delete in interface IRatingDAO
        Parameters:
        nIdRating - the n id rating
        plugin - the plugin
      • deleteByResource

        public void deleteByResource​(java.lang.String strIdResource,
                                     java.lang.String strResourceType,
                                     fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete by resource
        Specified by:
        deleteByResource in interface IRatingDAO
        Parameters:
        strIdResource - the Extendable resource id
        strResourceType - the Extendable Resourcer type
        plugin - the plugin
      • deleteByIdExtenderHistory

        public void deleteByIdExtenderHistory​(long nIdExtenderHistory,
                                              fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete By Id extender History.
        Specified by:
        deleteByIdExtenderHistory in interface IRatingDAO
        plugin - the plugin
      • deleteByListExtenderHistory

        public void deleteByListExtenderHistory​(java.util.List<java.lang.Long> listIdExtenderHistory,
                                                fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Delete By list Id extender History.
        Specified by:
        deleteByListExtenderHistory in interface IRatingDAO
        Parameters:
        listIdExtenderHistory - the list Id extender History
        plugin - the plugin
      • findByResourceAndRatingType

        public java.util.List<Rating> findByResourceAndRatingType​(java.util.List<java.lang.String> listIdResource,
                                                                  java.lang.String strExtendableResourceType,
                                                                  java.lang.String strRatingType,
                                                                  fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IRatingDAO
        Find a list Rating
        Specified by:
        findByResourceAndRatingType in interface IRatingDAO
        Parameters:
        listIdResource - the list of extender resource id
        strExtendableResourceType - the str extendable resource type
        strRatingType - the rating type
        plugin - the plugin
        Returns:
        the corresponding list Rating
      • selectRatingValue

        public float[] selectRatingValue​(java.util.List<java.lang.String> listIdResource,
                                         java.lang.String strExtendableResourceType,
                                         java.lang.String strRatingType,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        selectRatingValue in interface IRatingDAO
      • findByHistoryExtenderIds

        public java.util.List<Rating> findByHistoryExtenderIds​(java.util.List<java.lang.Long> lIdHistoryExtenderId,
                                                               fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Description copied from interface: IRatingDAO
        Find a list Rating
        Specified by:
        findByHistoryExtenderIds in interface IRatingDAO
        Parameters:
        lIdHistoryExtenderId - the list of extender id
        plugin - the plugin
        Returns:
        the corresponding list Rating