com.silverpeas.questionReply.web
Class QuestionEntity

java.lang.Object
  extended by com.silverpeas.questionReply.web.QuestionEntity
All Implemented Interfaces:
com.silverpeas.web.Exposable, Serializable

public class QuestionEntity
extends Object
implements com.silverpeas.web.Exposable

Author:
emmanuel.hugonnet@silverpeas.org
See Also:
Serialized Form

Constructor Summary
protected QuestionEntity()
           
 
Method Summary
 boolean equals(Object obj)
           
static QuestionEntity fromQuestion(Question question, String lang)
          Creates a new question entity from the specified question.
static List<QuestionEntity> fromQuestions(Iterable<Question> questions, String lang)
          Creates several new reply entities from the specified list of questions.
 String getCategoryId()
           
 String getContent()
           
 String getCreationDate()
           
 AuthorEntity getCreator()
           
 String getCreatorId()
           
 String getId()
           
 String getInstanceId()
           
 int getPrivateReplyNumber()
           
 int getPublicReplyNumber()
           
 int getReplyNumber()
           
 int getStatus()
           
 String getTitle()
           
 URI getURI()
          Gets the URI of this comment entity.
 int hashCode()
           
 Question toQuestion()
          Gets the reply business objet this entity represent.
 String toString()
           
 QuestionEntity withURI(URI uri)
          Sets a URI to this entity.
 QuestionEntity withUser(com.stratelia.webactiv.beans.admin.UserDetail userDetail, com.stratelia.webactiv.SilverpeasRole profile)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QuestionEntity

protected QuestionEntity()
Method Detail

withURI

public QuestionEntity withURI(URI uri)
Sets a URI to this entity. With this URI, it can then be accessed through the Web.

Parameters:
uri - the web entity URI.
Returns:
itself.

getURI

public URI getURI()
Gets the URI of this comment entity.

Specified by:
getURI in interface com.silverpeas.web.Exposable
Returns:
the URI with which this entity can be access through the Web.

getCategoryId

public String getCategoryId()

getContent

public String getContent()

getCreationDate

public String getCreationDate()

getCreatorId

public String getCreatorId()

getId

public String getId()

getInstanceId

public String getInstanceId()

getPrivateReplyNumber

public int getPrivateReplyNumber()

getPublicReplyNumber

public int getPublicReplyNumber()

getReplyNumber

public int getReplyNumber()

getStatus

public int getStatus()

getTitle

public String getTitle()

getCreator

public AuthorEntity getCreator()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

fromQuestion

public static QuestionEntity fromQuestion(Question question,
                                          String lang)
Creates a new question entity from the specified question.

Parameters:
question - the question to entitify.
lang - the language of the current User.
Returns:
the entity representing the specified question.

fromQuestions

public static List<QuestionEntity> fromQuestions(Iterable<Question> questions,
                                                 String lang)
Creates several new reply entities from the specified list of questions.

Parameters:
questions - the list of questions to entitify.
lang - the language of the current User.
Returns:
a list of entities representing each of then one of the specified questions.

toQuestion

public Question toQuestion()
Gets the reply business objet this entity represent.

Returns:
a reply instance.

withUser

public QuestionEntity withUser(com.stratelia.webactiv.beans.admin.UserDetail userDetail,
                               com.stratelia.webactiv.SilverpeasRole profile)

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016 Silverpeas. All Rights Reserved.