fr.paris.lutece.plugins.extend.modules.rating.service
public class RatingService extends Object implements IRatingService
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_SERVICE
The Constant BEAN_SERVICE.
|
| Constructor and Description |
|---|
RatingService() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Rating rating)
Insert.
|
void |
doCancelVote(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType)
Do cancel the vote of a user
|
void |
doVote(String strIdExtendableResource,
String strExtendableResourceType,
int nVoteValue,
javax.servlet.http.HttpServletRequest request)
Increment vote.
|
Rating |
findByPrimaryKey(int nIdRating)
Load.
|
Rating |
findByResource(String strIdExtendableResource,
String strExtendableResourceType)
Select by resource.
|
List<Integer> |
findIdMostRatedResources(String strExtendableResourceType,
int nItemsOffset,
int nMaxItemsNumber)
Get the ids of resources ordered by their number of ratings
|
void |
remove(int nIdRating)
Delete.
|
void |
removeByResource(String strIdExtendableResource,
String strExtendableResourceType)
Delete by resource
|
void |
update(Rating rating)
Store.
|
public static final String BEAN_SERVICE
@Transactional(value="extend-rating.transactionManager") public void create(Rating rating)
create in interface IRatingServicerating - the rating@Transactional(value="extend-rating.transactionManager") public void update(Rating rating)
update in interface IRatingServicerating - the rating@Transactional(value="extend-rating.transactionManager") public void doVote(String strIdExtendableResource, String strExtendableResourceType, int nVoteValue, javax.servlet.http.HttpServletRequest request)
doVote in interface IRatingServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typenVoteValue - the n vote valuerequest - the request@Transactional(value="extend-rating.transactionManager")
public void doCancelVote(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType)
doCancelVote in interface IRatingServiceuser - The userstrIdExtendableResource - The id of the extendable resourcestrExtendableResourceType - The extendable resource type@Transactional(value="extend-rating.transactionManager") public void remove(int nIdRating)
remove in interface IRatingServicenIdRating - the n id rating@Transactional(value="extend-rating.transactionManager") public void removeByResource(String strIdExtendableResource, String strExtendableResourceType)
removeByResource in interface IRatingServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typepublic Rating findByPrimaryKey(int nIdRating)
findByPrimaryKey in interface IRatingServicenIdRating - the n id ratingpublic Rating findByResource(String strIdExtendableResource, String strExtendableResourceType)
findByResource in interface IRatingServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typepublic List<Integer> findIdMostRatedResources(String strExtendableResourceType, int nItemsOffset, int nMaxItemsNumber)
findIdMostRatedResources in interface IRatingServicestrExtendableResourceType - The type of resources to considernItemsOffset - The offset of the items to get, or 0 to get items
from the first onenMaxItemsNumber - The maximum number of items to return, or 0 to get
every itemsCopyright © 2014 Mairie de Paris. All rights reserved.