org.ow2.bonita.pvm.internal.model
Class CommentImpl

java.lang.Object
  extended by org.ow2.bonita.pvm.internal.model.CommentImpl
All Implemented Interfaces:
java.io.Serializable, Comment, Discussable

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

See Also:
Serialized Form

Field Summary
protected  java.util.List<CommentImpl> comments
           
protected  long dbid
           
protected  int dbversion
           
protected  java.lang.String message
           
protected  CommentImpl parent
           
protected  java.util.Date time
           
protected  java.lang.String userId
           
 
Constructor Summary
CommentImpl()
           
CommentImpl(java.lang.String message)
           
 
Method Summary
 Comment createComment(java.lang.String message)
          create a comment
 boolean equals(java.lang.Object o)
           
 java.util.List<Comment> getComments()
          all comments.
 long getDbid()
          the meaningless database primary key
 java.lang.String getMessage()
          the actual message.
 Comment getParent()
           
 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 removeComment(Comment comment)
          remove a comment
 void setComments(java.util.List<CommentImpl> replies)
           
 void setMessage(java.lang.String message)
           
 void setParent(CommentImpl parent)
           
 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

parent

protected CommentImpl parent

comments

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

CommentImpl

public CommentImpl()

CommentImpl

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

createComment

public Comment createComment(java.lang.String message)
Description copied from interface: Discussable
create a comment

Specified by:
createComment in interface Discussable

removeComment

public void removeComment(Comment comment)
Description copied from interface: Discussable
remove a comment

Specified by:
removeComment in interface Discussable

getParent

public Comment getParent()

setParent

public void setParent(CommentImpl parent)

getComments

public java.util.List<Comment> getComments()
Description copied from interface: Discussable
all comments.

Specified by:
getComments in interface Discussable

setComments

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

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)


Copyright © 2009 OW2 Consortium. All Rights Reserved.