org.jbpm.pvm.impl
Class CommentImpl

java.lang.Object
  extended by org.jbpm.pvm.impl.CommentImpl
All Implemented Interfaces:
java.io.Serializable, Comment

public class CommentImpl
extends java.lang.Object
implements java.io.Serializable, Comment

See Also:
Serialized Form

Field Summary
protected  long dbid
           
protected  int dbversion
           
protected  java.lang.String message
           
protected  java.util.List<CommentImpl> replies
           
protected  CommentImpl replyTarget
           
protected  java.util.Date time
           
protected  java.lang.String userId
           
 
Constructor Summary
CommentImpl()
           
CommentImpl(java.lang.String message)
           
 
Method Summary
 Comment createReply(java.lang.String message)
          add a reply to this comment
 boolean equals(java.lang.Object o)
           
 long getDbid()
          the meaningless database primary key
 java.lang.String getMessage()
          the actual message.
 java.util.List<Comment> getReplies()
          replies to this comment
 Comment getReplyTarget()
          the comment to which this comment is a reply.
 java.util.Date getTime()
          time that specifies when the comment was made
 java.lang.String getUserId()
          the id of the user that made this comment.
 void removeReply(Comment reply)
          remove a reply from this comment.
 void setMessage(java.lang.String message)
           
 void setReplies(java.util.List<CommentImpl> replies)
           
 void setReplyTarget(CommentImpl replyTarget)
           
 void setTime(java.util.Date time)
           
 void setUserId(java.lang.String userId)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbid

protected long dbid

dbversion

protected int dbversion

userId

protected java.lang.String userId

time

protected java.util.Date time

message

protected java.lang.String message

replyTarget

protected CommentImpl replyTarget

replies

protected java.util.List<CommentImpl> replies
Constructor Detail

CommentImpl

public CommentImpl()

CommentImpl

public CommentImpl(java.lang.String message)
Method Detail

getReplyTarget

public Comment getReplyTarget()
Description copied from interface: Comment
the comment to which this comment is a reply.

Specified by:
getReplyTarget in interface Comment

setReplyTarget

public void setReplyTarget(CommentImpl replyTarget)

getReplies

public java.util.List<Comment> getReplies()
Description copied from interface: Comment
replies to this comment

Specified by:
getReplies in interface Comment

setReplies

public void setReplies(java.util.List<CommentImpl> replies)

createReply

public Comment createReply(java.lang.String message)
Description copied from interface: Comment
add a reply to this comment

Specified by:
createReply in interface Comment

removeReply

public void removeReply(Comment reply)
Description copied from interface: Comment
remove a reply from this comment. This will also remove the inverse relation by setting the reply's replyTarget property to null.

Specified by:
removeReply in interface Comment

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getDbid

public long getDbid()
Description copied from interface: Comment
the meaningless database primary key

Specified by:
getDbid in interface Comment

getUserId

public java.lang.String getUserId()
Description copied from interface: Comment
the id of the user that made this comment. The term actorId is an abstract reference to an entity in an external identity component.

Specified by:
getUserId in interface Comment

getMessage

public java.lang.String getMessage()
Description copied from interface: Comment
the actual message. Both plain text as well as HTML can be stored as the message.

Specified by:
getMessage in interface Comment

getTime

public java.util.Date getTime()
Description copied from interface: Comment
time that specifies when the comment was made

Specified by:
getTime in interface Comment

setUserId

public void setUserId(java.lang.String userId)

setTime

public void setTime(java.util.Date time)

setMessage

public void setMessage(java.lang.String message)