com.silverpeas.comment.web.mock
Class CommentDAOMock

java.lang.Object
  extended by com.silverpeas.comment.web.mock.CommentDAOMock
All Implemented Interfaces:
CommentDAO

@Named(value="commentDAO")
public class CommentDAOMock
extends Object
implements CommentDAO

A mock on a Comment


Constructor Summary
CommentDAOMock()
           
 
Method Summary
 List<Comment> getAllCommentsByForeignKey(String resourceType, ForeignPK pk)
           
 List<CommentedPublicationInfo> getAllMostCommentedPublications()
           
 Comment getComment(CommentPK pk)
           
 int getCommentsCountByForeignKey(String resourceType, ForeignPK pk)
           
 List<Comment> getLastComments(String instanceId, int count)
           
 List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType)
           
 List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType, List<? extends WAPrimaryKey> pks)
           
 List<SocialInformationComment> getSocialInformationCommentsListByUserId(List<String> resourceTypes, String userId, Period period)
           
 List<SocialInformationComment> getSocialInformationCommentsListOfMyContacts(List<String> resourceTypes, List<String> myContactsIds, List<String> instanceIds, Period period)
           
 void moveComments(String resourceType, ForeignPK fromPK, ForeignPK toPK)
           
 void moveComments(String fromResourceType, ForeignPK fromPK, String toResourceType, ForeignPK toPK)
           
 void removeAllCommentsByForeignPk(String resourceType, ForeignPK pk)
           
 void removeComment(CommentPK pk)
           
 CommentPK saveComment(Comment cmt)
           
 void updateComment(Comment cmt)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommentDAOMock

public CommentDAOMock()
Method Detail

saveComment

public CommentPK saveComment(Comment cmt)
Specified by:
saveComment in interface CommentDAO

removeAllCommentsByForeignPk

public void removeAllCommentsByForeignPk(String resourceType,
                                         ForeignPK pk)
Specified by:
removeAllCommentsByForeignPk in interface CommentDAO

removeComment

public void removeComment(CommentPK pk)
Specified by:
removeComment in interface CommentDAO

getAllCommentsByForeignKey

public List<Comment> getAllCommentsByForeignKey(String resourceType,
                                                ForeignPK pk)
Specified by:
getAllCommentsByForeignKey in interface CommentDAO

getComment

public Comment getComment(CommentPK pk)
Specified by:
getComment in interface CommentDAO

getCommentsCountByForeignKey

public int getCommentsCountByForeignKey(String resourceType,
                                        ForeignPK pk)
Specified by:
getCommentsCountByForeignKey in interface CommentDAO

getMostCommentedPublications

public List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType,
                                                                   List<? extends WAPrimaryKey> pks)
Specified by:
getMostCommentedPublications in interface CommentDAO

getAllMostCommentedPublications

public List<CommentedPublicationInfo> getAllMostCommentedPublications()
Specified by:
getAllMostCommentedPublications in interface CommentDAO

moveComments

public void moveComments(String resourceType,
                         ForeignPK fromPK,
                         ForeignPK toPK)
Specified by:
moveComments in interface CommentDAO

moveComments

public void moveComments(String fromResourceType,
                         ForeignPK fromPK,
                         String toResourceType,
                         ForeignPK toPK)
Specified by:
moveComments in interface CommentDAO

updateComment

public void updateComment(Comment cmt)
Specified by:
updateComment in interface CommentDAO

getMostCommentedPublications

public List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType)
Specified by:
getMostCommentedPublications in interface CommentDAO

getLastComments

public List<Comment> getLastComments(String instanceId,
                                     int count)
Specified by:
getLastComments in interface CommentDAO

getSocialInformationCommentsListByUserId

public List<SocialInformationComment> getSocialInformationCommentsListByUserId(List<String> resourceTypes,
                                                                               String userId,
                                                                               Period period)
Specified by:
getSocialInformationCommentsListByUserId in interface CommentDAO

getSocialInformationCommentsListOfMyContacts

public List<SocialInformationComment> getSocialInformationCommentsListOfMyContacts(List<String> resourceTypes,
                                                                                   List<String> myContactsIds,
                                                                                   List<String> instanceIds,
                                                                                   Period period)
Specified by:
getSocialInformationCommentsListOfMyContacts in interface CommentDAO


Copyright © 2016 Silverpeas. All Rights Reserved.