Interface CommentManager
-
public interface CommentManager
This is subsystem which allows to keep various user comments. Each comment is identified by comment id.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Comment
createComment(long commentId, long userId, java.lang.String comment, java.util.Date timestamp)
Used to create Comment object from existing data, for example loaded from SQL query.Comment
findComment(long commentId)
Find comment by comment IdComment
newComment(long userId, java.lang.String comment)
Create new commentComment
newComment(SUser user, java.lang.String comment)
Creates new comment
-
-
-
Method Detail
-
newComment
@NotNull Comment newComment(long userId, java.lang.String comment)
Create new comment- Parameters:
userId
- Id of user, -1 if not availablecomment
- comment- Returns:
- created comment
-
newComment
@NotNull Comment newComment(@Nullable SUser user, java.lang.String comment)
Creates new comment- Parameters:
user
- usercomment
- comment- Returns:
- new comment
-
findComment
@Nullable Comment findComment(long commentId)
Find comment by comment Id- Parameters:
commentId
- comment identifier- Returns:
- found comment object or null
-
createComment
@NotNull Comment createComment(long commentId, long userId, java.lang.String comment, java.util.Date timestamp)
Used to create Comment object from existing data, for example loaded from SQL query. If brand new comment should be created, use newComment method- Parameters:
commentId
- id of the comment to be createduserId
- Id of user, -1 if not availablecomment
- comment texttimestamp
- when comment was created- Returns:
- see above
-
-