Class RatingDAO

  • All Implemented Interfaces:
    IRatingDAO

    public class RatingDAO
    extends Object
    implements IRatingDAO
    This class provides Data Access methods for Rating objects.
    • 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 List<Rating> loadByResource​(String strIdExtendableResource,
                                           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 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 Optional<Rating> load​(String strIdExtendableResource,
                                     String strExtendableResourceType,
                                     String ratingType,
                                     double value,
                                     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​(String strIdResource,
                                     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​(List<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 List<Rating> findByResourceAndRatingType​(List<String> listIdResource,
                                                        String strExtendableResourceType,
                                                        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​(List<String> listIdResource,
                                         String strExtendableResourceType,
                                         String strRatingType,
                                         fr.paris.lutece.portal.service.plugin.Plugin plugin)
        Specified by:
        selectRatingValue in interface IRatingDAO
      • findByHistoryExtenderIds

        public List<Rating> findByHistoryExtenderIds​(List<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