public class FavoriteService extends Object implements IFavoriteService
| Modifier and Type | Field and Description |
|---|---|
static String |
BEAN_SERVICE
The Constant BEAN_SERVICE.
|
| Constructor and Description |
|---|
FavoriteService() |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Favorite favorite)
Insert.
|
void |
doCancelFavorite(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType,
javax.servlet.http.HttpServletRequest request)
Do cancel the vote of a user
|
void |
doFavorite(String strIdExtendableResource,
String strExtendableResourceType,
int nVoteValue,
javax.servlet.http.HttpServletRequest request)
Increment vote.
|
List<Favorite> |
findByFilter(FavoriteFilter filter)
Find by filter
|
Favorite |
findByPrimaryKey(int nIdFavorite)
Load.
|
Favorite |
findByResource(String strIdExtendableResource,
String strExtendableResourceType)
Select by resource.
|
void |
remove(int nIdFavorite)
Delete.
|
void |
removeByResource(String strIdExtendableResource,
String strExtendableResourceType)
Delete by resource
|
void |
update(Favorite favorite)
Store.
|
public static final String BEAN_SERVICE
@Transactional(value="extendfavorite.transactionManager") public void create(Favorite favorite)
create in interface IFavoriteServicefavorite - the favorite@Transactional(value="extendfavorite.transactionManager") public void update(Favorite favorite)
update in interface IFavoriteServicefavorite - the favorite@Transactional(value="extendfavorite.transactionManager") public void doFavorite(String strIdExtendableResource, String strExtendableResourceType, int nVoteValue, javax.servlet.http.HttpServletRequest request)
doFavorite in interface IFavoriteServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typenVoteValue - the n vote valuerequest - the request@Transactional(value="extendfavorite.transactionManager")
public void doCancelFavorite(fr.paris.lutece.portal.service.security.LuteceUser user,
String strIdExtendableResource,
String strExtendableResourceType,
javax.servlet.http.HttpServletRequest request)
doCancelFavorite in interface IFavoriteServiceuser - The userstrIdExtendableResource - The id of the extendable resourcestrExtendableResourceType - The extendable resource typerequest - the request@Transactional(value="extendfavorite.transactionManager") public void remove(int nIdFavorite)
remove in interface IFavoriteServicenIdFavorite - the nId favorite@Transactional(value="extendfavorite.transactionManager") public void removeByResource(String strIdExtendableResource, String strExtendableResourceType)
removeByResource in interface IFavoriteServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typepublic Favorite findByPrimaryKey(int nIdFavorite)
findByPrimaryKey in interface IFavoriteServicenIdFavorite - the n id favoritepublic Favorite findByResource(String strIdExtendableResource, String strExtendableResourceType)
findByResource in interface IFavoriteServicestrIdExtendableResource - the str id extendable resourcestrExtendableResourceType - the str extendable resource typepublic List<Favorite> findByFilter(FavoriteFilter filter)
findByFilter in interface IFavoriteServicefilter - the filterCopyright © 2021 City of Paris. All rights reserved.