fr.paris.lutece.plugins.extend.modules.rating.business
Interface IRatingDAO

All Known Implementing Classes:
RatingDAO

public interface IRatingDAO

ICommentDAO.


Method Summary
 void delete(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete.
 void deleteByResource(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete by id hub resource.
 List<Integer> findIdMostRatedResources(String strExtendableResourceType, int nItemsOffset, int nMaxItemsNumber, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the ids of resources ordered by their number of ratings
 void insert(Rating rating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Insert.
 Rating load(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Load.
 Rating loadByResource(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select by id hub resource.
 void store(Rating rating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Store.
 

Method Detail

delete

void delete(int nIdRating,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete.

Parameters:
nIdRating - the n id rating
plugin - the plugin

deleteByResource

void deleteByResource(String strIdExtendableResource,
                      String strExtendableResourceType,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete by id hub resource.

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
plugin - the plugin

insert

void insert(Rating rating,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert.

Parameters:
rating - the rating
plugin - the plugin

load

Rating load(int nIdRating,
            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Load.

Parameters:
nIdRating - the n id rating
plugin - the plugin
Returns:
the rating

store

void store(Rating rating,
           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Store.

Parameters:
rating - the rating
plugin - the plugin

loadByResource

Rating loadByResource(String strIdExtendableResource,
                      String strExtendableResourceType,
                      fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select by id hub resource.

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
plugin - the plugin
Returns:
the rating

findIdMostRatedResources

List<Integer> findIdMostRatedResources(String strExtendableResourceType,
                                       int nItemsOffset,
                                       int nMaxItemsNumber,
                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the ids of resources ordered by their number of ratings

Parameters:
strExtendableResourceType - The type of resources to consider
nItemsOffset - The offset of the items to get, or 0 to get items from the first one
nMaxItemsNumber - The maximum number of items to return, or 0 to get every items
plugin - the plugin
Returns:
The list of ids of resources ordered by the number of associated comments


Copyright © 2013 Mairie de Paris. All Rights Reserved.