|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.comment.dao.jdbc.JDBCCommentDAO
@Named(value="commentDAO") public class JDBCCommentDAO
Field Summary | |
---|---|
protected static long |
serialVersionUID
|
Constructor Summary | |
---|---|
JDBCCommentDAO()
|
Method Summary | |
---|---|
List<Comment> |
getAllCommentsByForeignKey(String resourceType,
ForeignPK foreign_pk)
Gets all the comments of the publication identified by the resource type and the specified foreign key. |
List<CommentedPublicationInfo> |
getAllMostCommentedPublications()
Among all available commented publications, gets the most commented ones. |
Comment |
getComment(CommentPK pk)
Gets the comment identified by the specified primary key. |
int |
getCommentsCountByForeignKey(String resourceType,
ForeignPK foreign_pk)
Gets the number of comments on the publication identified by the resource type and the specified foreign key. |
List<Comment> |
getLastComments(String instanceId,
int count)
Gets the last comments posted to the publications in the specified component instance. |
List<CommentedPublicationInfo> |
getMostCommentedPublications(String resourceType)
Among all available commented publications of the specified type, gets the moste commented ones. |
List<CommentedPublicationInfo> |
getMostCommentedPublications(String resourceType,
List<? extends WAPrimaryKey> pks)
Among all the publications identified by the resource type and the specified primary keys, gets the most commented ones. |
List<SocialInformationComment> |
getSocialInformationCommentsListByUserId(List<String> resourceTypes,
String userId,
Period period)
Get the list of SocialInformationComment added by userId in a period |
List<SocialInformationComment> |
getSocialInformationCommentsListOfMyContacts(List<String> resourceTypes,
List<String> myContactsIds,
List<String> instanceIds,
Period period)
Gets the list of SocialInformationComment added by myContactsIds in a period |
void |
moveComments(String resourceType,
ForeignPK fromPK,
ForeignPK toPK)
Moves all the comments from the publication identified by the resource type and the specified foreign key to the publication identified by the second specified foreign key. |
void |
moveComments(String fromResourceType,
ForeignPK fromPK,
String toResourceType,
ForeignPK toPK)
Moves all the comments from the publication identified by the resource type and the specified foreign key to the publication identified by the second resource type and specified foreign key. |
void |
removeAllCommentsByForeignPk(String resourceType,
ForeignPK foreign_pk)
Deletes all the comments on the publication identified by the resource type and the specified foreign key. |
void |
removeComment(CommentPK pk)
Deletes the comment identified by the specified primary key |
CommentPK |
saveComment(Comment cmt)
Saves the specified comment into the underlying data source. |
void |
updateComment(Comment cmt)
Updates the comment in the data source identified by the specified one with the values carried by the specified comment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final long serialVersionUID
Constructor Detail |
---|
public JDBCCommentDAO()
Method Detail |
---|
public CommentPK saveComment(Comment cmt)
CommentDAO
saveComment
in interface CommentDAO
cmt
- the comment to save.
public void removeComment(CommentPK pk)
CommentDAO
removeComment
in interface CommentDAO
public void updateComment(Comment cmt)
CommentDAO
updateComment
in interface CommentDAO
cmt
- the comment to update in the data source.public Comment getComment(CommentPK pk)
CommentDAO
getComment
in interface CommentDAO
pk
- the primary key of the comment to get.
public List<CommentedPublicationInfo> getAllMostCommentedPublications()
CommentDAO
getAllMostCommentedPublications
in interface CommentDAO
public List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType, List<? extends WAPrimaryKey> pks)
CommentDAO
getMostCommentedPublications
in interface CommentDAO
resourceType
- type of the commented publication.pks
- a list of primary keys refering some publications.
public int getCommentsCountByForeignKey(String resourceType, ForeignPK foreign_pk)
CommentDAO
getCommentsCountByForeignKey
in interface CommentDAO
resourceType
- type of the commented publication.foreign_pk
- the foreign key refering the publication.
public List<Comment> getAllCommentsByForeignKey(String resourceType, ForeignPK foreign_pk)
CommentDAO
getAllCommentsByForeignKey
in interface CommentDAO
resourceType
- type of the commented publication.foreign_pk
- the foreign key refering the publication in the data source.
public void removeAllCommentsByForeignPk(String resourceType, ForeignPK foreign_pk)
CommentDAO
removeAllCommentsByForeignPk
in interface CommentDAO
resourceType
- type of the commented publication.foreign_pk
- the foreign key refering the publication in the data sourcepublic void moveComments(String resourceType, ForeignPK fromPK, ForeignPK toPK)
CommentDAO
moveComments
in interface CommentDAO
resourceType
- type of source and destination publication.fromPK
- the foreign key refering the source publication.toPK
- the foreign key refering the destination publication.public void moveComments(String fromResourceType, ForeignPK fromPK, String toResourceType, ForeignPK toPK)
CommentDAO
moveComments
in interface CommentDAO
fromResourceType
- source type the source publication.fromPK
- the foreign key refering the source publication.toResourceType
- type of the destination publication.toPK
- the foreign key refering the destination publication.public List<CommentedPublicationInfo> getMostCommentedPublications(String resourceType)
CommentDAO
getMostCommentedPublications
in interface CommentDAO
resourceType
- the type of the publication.
public List<Comment> getLastComments(String instanceId, int count)
CommentDAO
getLastComments
in interface CommentDAO
instanceId
- the unique identifier of the component instance.count
- the maximum number of comments to fetch. Lesser or equal to 0 means no limit.
public List<SocialInformationComment> getSocialInformationCommentsListByUserId(List<String> resourceTypes, String userId, Period period)
CommentDAO
getSocialInformationCommentsListByUserId
in interface CommentDAO
resourceTypes
- the aimed resources types.userId
- the author of comments.period
- the period into which the comment has been created or modified.
SocialInformation
public List<SocialInformationComment> getSocialInformationCommentsListOfMyContacts(List<String> resourceTypes, List<String> myContactsIds, List<String> instanceIds, Period period)
CommentDAO
getSocialInformationCommentsListOfMyContacts
in interface CommentDAO
resourceTypes
- the aimed resources types.myContactsIds
- the aimed user identifiers of contacts.instanceIds
- the aimed identifiers of component instances.period
- the period into which the comment has been created or modified.
SocialInformation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |