fr.paris.lutece.plugins.extend.modules.comment.service
Interface ICommentService

All Known Implementing Classes:
CommentService

public interface ICommentService

ICommentService.


Method Summary
 void create(Comment comment)
          Insert.
 Comment findByPrimaryKey(int nIdComment)
          Load.
 java.util.List<Comment> findByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, boolean bPublishedOnly, boolean bAscSort)
          Select by resource.
 java.util.List<Comment> findLastComments(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType, int nNbComments, boolean bPublishedOnly)
          Load last comments.
 int getCommentNb(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
          Check comment nb.
 void remove(int nIdComment)
          Delete.
 void removeByResource(java.lang.String strIdExtendableResource, java.lang.String strExtendableResourceType)
          Delete by resource
 void update(Comment comment)
          Store.
 void updateCommentStatus(int nIdComment, boolean bPublished)
          Update comment status.
 

Method Detail

remove

@Transactional(value="extend-comment.transactionManager")
void remove(int nIdComment)
Delete.

Parameters:
nIdComment - the n id comment

removeByResource

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

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type

create

@Transactional(value="extend-comment.transactionManager")
void create(Comment comment)
Insert.

Parameters:
comment - the comment

update

@Transactional(value="extend-comment.transactionManager")
void update(Comment comment)
Store.

Parameters:
comment - the comment

updateCommentStatus

@Transactional(value="extend-comment.transactionManager")
void updateCommentStatus(int nIdComment,
                                       boolean bPublished)
Update comment status.

Parameters:
nIdComment - the n id comment
bPublished - the b published

findByPrimaryKey

Comment findByPrimaryKey(int nIdComment)
Load.

Parameters:
nIdComment - the n id comment
Returns:
the comment

findByResource

java.util.List<Comment> findByResource(java.lang.String strIdExtendableResource,
                                       java.lang.String strExtendableResourceType,
                                       boolean bPublishedOnly,
                                       boolean bAscSort)
Select by resource.

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
bPublishedOnly - the b only published
bAscSort - True if comments should be sorted ascendantly, false otherwise
Returns:
the list

getCommentNb

int getCommentNb(java.lang.String strIdExtendableResource,
                 java.lang.String strExtendableResourceType)
Check comment nb.

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
Returns:
the int

findLastComments

java.util.List<Comment> findLastComments(java.lang.String strIdExtendableResource,
                                         java.lang.String strExtendableResourceType,
                                         int nNbComments,
                                         boolean bPublishedOnly)
Load last comments.

Parameters:
strIdExtendableResource - the str id extendable resource
strExtendableResourceType - the str extendable resource type
nNbComments - the n nb commentss
bPublishedOnly - the b published only
Returns:
the list


Copyright © 2012 Mairie de Paris. All Rights Reserved.