|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.domain.Entity
ccc.domain.CommentEntity
public class CommentEntity
A user comment. FIXME: email can be NULL.
Constructor Summary | |
---|---|
protected |
CommentEntity()
Constructor: for persistence only. |
|
CommentEntity(ResourceEntity resource,
java.lang.String body,
java.lang.String author)
Constructor. |
Method Summary | |
---|---|
Comment |
createDto()
Create a DTO for this comment. |
java.lang.String |
getAuthor()
Accessor. |
java.lang.String |
getBody()
Accessor. |
EmailAddress |
getEmail()
Accessor. |
ResourceEntity |
getResource()
Accessor. |
CommentStatus |
getStatus()
Accessor. |
java.util.Date |
getTimestamp()
Accessor. |
java.net.URL |
getUrl()
Accessor. |
static java.util.List<Comment> |
map(java.util.List<CommentEntity> comments)
Map a list of comments to a list of comment DTOs. |
void |
setAuthor(java.lang.String author)
Mutator. |
void |
setBody(java.lang.String body)
Mutator. |
void |
setEmail(EmailAddress email)
Mutator. |
void |
setStatus(CommentStatus status)
Mutator. |
void |
setUrl(java.net.URL url)
Mutator. |
Methods inherited from class ccc.domain.Entity |
---|
equals, getId, getVersion, hashCode, setId, toJson, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected CommentEntity()
public CommentEntity(ResourceEntity resource, java.lang.String body, java.lang.String author)
resource
- The resource this comment refers to.body
- The comment's body content.author
- The comment's author.Method Detail |
---|
public java.lang.String getBody()
public final void setBody(java.lang.String body)
body
- The body to set.public ResourceEntity getResource()
public java.lang.String getAuthor()
public final void setAuthor(java.lang.String author)
author
- The author to set.public void setUrl(java.net.URL url)
url
- The comment's URL, the URL may be NULL.public java.net.URL getUrl()
public java.util.Date getTimestamp()
public final CommentStatus getStatus()
public final void setStatus(CommentStatus status)
status
- The status to set.public final EmailAddress getEmail()
public final void setEmail(EmailAddress email)
email
- The email to set.public Comment createDto()
public static java.util.List<Comment> map(java.util.List<CommentEntity> comments)
comments
- The comments to map.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |