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 booleanequals(java.lang.Object o)java.lang.StringgetComment()java.util.List<Comment>getComments()java.util.UUIDgetOwnerId()intgetTreeSize()AbstractXmlBuildergetXmlBuilder()inthashCode()booleanisPublic()voidsetComment(java.lang.String comment)voidsetComments(java.util.List<Comment> comments)voidsetOwnerId(java.util.UUID ownerId)voidsetPublic(boolean aPublic)java.lang.StringtoString()-
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:
equalsin classAbstractEntity
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractEntity
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractEntity
-
getXmlBuilder
public AbstractXmlBuilder getXmlBuilder()
- Specified by:
getXmlBuilderin classAbstractEntity
-
-