Class RatingDAO
- java.lang.Object
-
- fr.paris.lutece.plugins.extend.modules.rating.business.RatingDAO
-
- All Implemented Interfaces:
IRatingDAO
public class RatingDAO extends Object implements IRatingDAO
This class provides Data Access methods for Rating objects.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONSTANT_ANDstatic StringCONSTANT_WHERE
-
Constructor Summary
Constructors Constructor Description RatingDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete.voiddeleteByIdExtenderHistory(long nIdExtenderHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete By Id extender History.voiddeleteByListExtenderHistory(List<Long> listIdExtenderHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete By list Id extender History.voiddeleteByResource(String strIdResource, String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete by resourceRatingfindByHistoryExtenderId(long lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find aRatingList<Rating>findByHistoryExtenderIds(List<Long> lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find a listRatingList<Rating>findByResourceAndRatingType(List<String> listIdResource, String strExtendableResourceType, String strRatingType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Find a listRatingvoidinsert(Rating rating, fr.paris.lutece.portal.service.plugin.Plugin plugin)Insert.Optional<Rating>load(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)load by primary keyOptional<Rating>load(String strIdExtendableResource, String strExtendableResourceType, String ratingType, double value, String userGuid, fr.paris.lutece.portal.service.plugin.Plugin plugin)load by primary keyList<Rating>loadByResource(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)Select by resource.List<Rating>selectRatingByFilter(RatingExtenderFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)float[]selectRatingValue(List<String> listIdResource, String strExtendableResourceType, String strRatingType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
-
-
-
Field Detail
-
CONSTANT_WHERE
public static final String CONSTANT_WHERE
- See Also:
- Constant Field Values
-
CONSTANT_AND
public static final String CONSTANT_AND
- See Also:
- Constant Field Values
-
-
Method Detail
-
insert
public void insert(Rating rating, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Insert.- Specified by:
insertin interfaceIRatingDAO- Parameters:
rating- the ratingplugin- the plugin
-
loadByResource
public List<Rating> loadByResource(String strIdExtendableResource, String strExtendableResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select by resource.- Specified by:
loadByResourcein interfaceIRatingDAO- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typeplugin- the plugin- Returns:
- the rating list
-
findByHistoryExtenderId
public Rating findByHistoryExtenderId(long lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:IRatingDAOFind aRating- Specified by:
findByHistoryExtenderIdin interfaceIRatingDAO- Parameters:
lIdHistoryExtenderId- the extender idplugin- 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:
loadin interfaceIRatingDAO- Parameters:
nIdRating- the rating idplugin- 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:
loadin interfaceIRatingDAO- Parameters:
strIdExtendableResource- the str id extendable resourcestrExtendableResourceType- the str extendable resource typeratingType- the rating typevalue- the rating valueplugin- the plugin- Returns:
- the rating
-
delete
public void delete(int nIdRating, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete.- Specified by:
deletein interfaceIRatingDAO- Parameters:
nIdRating- the n id ratingplugin- the plugin
-
deleteByResource
public void deleteByResource(String strIdResource, String strResourceType, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete by resource- Specified by:
deleteByResourcein interfaceIRatingDAO- Parameters:
strIdResource- the Extendable resource idstrResourceType- the Extendable Resourcer typeplugin- the plugin
-
deleteByIdExtenderHistory
public void deleteByIdExtenderHistory(long nIdExtenderHistory, fr.paris.lutece.portal.service.plugin.Plugin plugin)Delete By Id extender History.- Specified by:
deleteByIdExtenderHistoryin interfaceIRatingDAOplugin- 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:
deleteByListExtenderHistoryin interfaceIRatingDAO- Parameters:
listIdExtenderHistory- the list Id extender Historyplugin- 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:IRatingDAOFind a listRating- Specified by:
findByResourceAndRatingTypein interfaceIRatingDAO- Parameters:
listIdResource- the list of extender resource idstrExtendableResourceType- the str extendable resource typestrRatingType- the rating typeplugin- 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:
selectRatingValuein interfaceIRatingDAO
-
findByHistoryExtenderIds
public List<Rating> findByHistoryExtenderIds(List<Long> lIdHistoryExtenderId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
Description copied from interface:IRatingDAOFind a listRating- Specified by:
findByHistoryExtenderIdsin interfaceIRatingDAO- Parameters:
lIdHistoryExtenderId- the list of extender idplugin- the plugin- Returns:
- the corresponding list
Rating
-
selectRatingByFilter
public List<Rating> selectRatingByFilter(RatingExtenderFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
- Specified by:
selectRatingByFilterin interfaceIRatingDAO
-
-