fr.paris.lutece.plugins.extend.modules.rating.service
Class RatingService

java.lang.Object
  extended by fr.paris.lutece.plugins.extend.modules.rating.service.RatingService
All Implemented Interfaces:
IRatingService

public class RatingService
extends java.lang.Object
implements IRatingService

RatingService


Field Summary
static java.lang.String BEAN_SERVICE
          The Constant BEAN_SERVICE.
 
Constructor Summary
RatingService()
           
 
Method Summary
 void create(Rating rating)
          Insert.
 void doVote(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, int nVoteValue, javax.servlet.http.HttpServletRequest request)
          Increment vote.
 Rating findByPrimaryKey(int nIdRating)
          Load.
 Rating findByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
          Select by resource.
 void remove(int nIdRating)
          Delete.
 void removeByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
          Delete by resource
 void update(Rating rating)
          Store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BEAN_SERVICE

public static final java.lang.String BEAN_SERVICE
The Constant BEAN_SERVICE.

See Also:
Constant Field Values
Constructor Detail

RatingService

public RatingService()
Method Detail

create

@Transactional(value="extend-rating.transactionManager")
public void create(Rating rating)
Insert.

Specified by:
create in interface IRatingService
Parameters:
rating - the rating

update

@Transactional(value="extend-rating.transactionManager")
public void update(Rating rating)
Store.

Specified by:
update in interface IRatingService
Parameters:
rating - the rating

doVote

@Transactional(value="extend-rating.transactionManager")
public void doVote(java.lang.String strIdExtendableResource,
                                 java.lang.String strExtendableResourceType,
                                 int nVoteValue,
                                 javax.servlet.http.HttpServletRequest request)
Increment vote.

Specified by:
doVote in interface IRatingService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
nVoteValue - the n vote value
request - the request

remove

@Transactional(value="extend-rating.transactionManager")
public void remove(int nIdRating)
Delete.

Specified by:
remove in interface IRatingService
Parameters:
nIdRating - the n id rating

removeByResource

@Transactional(value="extend-rating.transactionManager")
public void removeByResource(java.lang.String strIdExtendableResource,
                                           java.lang.String strExtendableResourceType)
Delete by resource

Specified by:
removeByResource in interface IRatingService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type

findByPrimaryKey

public Rating findByPrimaryKey(int nIdRating)
Load.

Specified by:
findByPrimaryKey in interface IRatingService
Parameters:
nIdRating - the n id rating
Returns:
the rating

findByResource

public Rating findByResource(java.lang.String strIdExtendableResource,
                             java.lang.String strExtendableResourceType)
Select by resource.

Specified by:
findByResource in interface IRatingService
Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
Returns:
the rating


Copyright © 2012 Mairie de Paris. All Rights Reserved.