Class QuestionEntity
- java.lang.Object
-
- org.silverpeas.components.questionreply.web.QuestionEntity
-
- All Implemented Interfaces:
Serializable,org.silverpeas.core.web.rs.WebEntity
public class QuestionEntity extends Object implements org.silverpeas.core.web.rs.WebEntity
- Author:
- emmanuel.hugonnet@silverpeas.org
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedQuestionEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static QuestionEntityfromQuestion(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.StringgetCategoryId()StringgetContent()StringgetCreationDate()AuthorEntitygetCreator()StringgetCreatorId()StringgetId()StringgetInstanceId()intgetPrivateReplyNumber()intgetPublicReplyNumber()intgetReplyNumber()intgetStatus()StringgetTitle()URIgetURI()Gets the URI of this comment entity.inthashCode()QuestiontoQuestion()Gets the reply business objet this entity represent.StringtoString()QuestionEntitywithURI(URI uri)Sets a URI to this entity.QuestionEntitywithUser(org.silverpeas.core.admin.user.model.User user, org.silverpeas.core.admin.user.model.SilverpeasRole profile)
-
-
-
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:
getURIin interfaceorg.silverpeas.core.web.rs.WebEntity- 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()
-
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(org.silverpeas.core.admin.user.model.User user, org.silverpeas.core.admin.user.model.SilverpeasRole profile)
-
-