public interface IRatingService
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.
|
@Transactional(value="extend-rating.transactionManager") void remove(int nIdRating)
nIdRating
- the n id rating@Transactional(value="extend-rating.transactionManager") void removeByResource(String strIdExtendableResource, String strExtendableResourceType)
strIdExtendableResource
- the str id extendable resourcestrExtendableResourceType
- the str extendable resource type@Transactional(value="extend-rating.transactionManager") void create(Rating rating)
rating
- the rating@Transactional(value="extend-rating.transactionManager") void update(Rating rating)
rating
- the rating@Transactional(value="extend-rating.transactionManager") void doVote(String strIdExtendableResource, String strExtendableResourceType, int nVoteValue, javax.servlet.http.HttpServletRequest request)
strIdExtendableResource
- the str id extendable resourcestrExtendableResourceType
- the str extendable resource typenVoteValue
- the n vote valuerequest
- the requestvoid doCancelVote(fr.paris.lutece.portal.service.security.LuteceUser user, String strIdExtendableResource, String strExtendableResourceType)
user
- The userstrIdExtendableResource
- The id of the extendable resourcestrExtendableResourceType
- The extendable resource typerequest
- The requestRating findByPrimaryKey(int nIdRating)
nIdRating
- the n id ratingRating findByResource(String strIdExtendableResource, String strExtendableResourceType)
strIdExtendableResource
- the str id extendable resourcestrExtendableResourceType
- the str extendable resource typeList<Integer> findIdMostRatedResources(String strExtendableResourceType, int nItemsOffset, int nMaxItemsNumber)
strExtendableResourceType
- 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 © 2015 City of Paris. All rights reserved.