Package no.nsd.qddt.domain.comment
Class Comment
- java.lang.Object
-
- no.nsd.qddt.domain.AbstractEntity
-
- no.nsd.qddt.domain.comment.Comment
-
@Entity public class Comment extends AbstractEntity
Current demand for comments is just for Survey. If we want to extend this to other entities we must change the relationship and hold the entry comment at each entity that wants a comment tree. Today we hold this in comments themselves. Today this relationship is like this ( Survey ← comment ← comment child ) If we need to change this, we'll have to add a empty root comment for every survey and replace survey_id with this root element, and add a reference for this root element to the corresponding survey , the relationship will be like this ( entity(survey) → comment root ← comments)
-
-
Field Summary
-
Fields inherited from class no.nsd.qddt.domain.AbstractEntity
LOG
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getComment()
java.util.List<Comment>
getComments()
java.util.UUID
getOwnerId()
int
getTreeSize()
AbstractXmlBuilder
getXmlBuilder()
int
hashCode()
boolean
isPublic()
void
setComment(java.lang.String comment)
void
setComments(java.util.List<Comment> comments)
void
setOwnerId(java.util.UUID ownerId)
void
setPublic(boolean aPublic)
java.lang.String
toString()
-
Methods inherited from class no.nsd.qddt.domain.AbstractEntity
getId, getModified, getModifiedBy, setField, setId, setModified, setModifiedBy
-
-
-
-
Method Detail
-
getOwnerId
public java.util.UUID getOwnerId()
-
setOwnerId
public void setOwnerId(java.util.UUID ownerId)
-
getComments
public java.util.List<Comment> getComments()
-
setComments
public void setComments(java.util.List<Comment> comments)
-
getComment
public java.lang.String getComment()
-
setComment
public void setComment(java.lang.String comment)
-
isPublic
public boolean isPublic()
-
setPublic
public void setPublic(boolean aPublic)
-
getTreeSize
public int getTreeSize()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAbstractEntity
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAbstractEntity
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractEntity
-
getXmlBuilder
public AbstractXmlBuilder getXmlBuilder()
- Specified by:
getXmlBuilder
in classAbstractEntity
-
-