Class QuestionEntity
java.lang.Object
org.silverpeas.components.questionreply.web.QuestionEntity
- All Implemented Interfaces:
Serializable,org.silverpeas.core.web.rs.WebEntity
- Author:
- emmanuel.hugonnet@silverpeas.org
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic 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.getId()intintintintgetTitle()getURI()Gets the URI of this comment entity.inthashCode()Gets the reply business objet this entity represent.toString()Sets a URI to this entity.withUser(org.silverpeas.core.admin.user.model.User user, org.silverpeas.core.admin.user.model.SilverpeasRole profile)
-
Constructor Details
-
QuestionEntity
protected QuestionEntity()
-
-
Method Details
-
withURI
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
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
-
getContent
-
getCreationDate
-
getCreatorId
-
getId
-
getInstanceId
-
getPrivateReplyNumber
public int getPrivateReplyNumber() -
getPublicReplyNumber
public int getPublicReplyNumber() -
getReplyNumber
public int getReplyNumber() -
getStatus
public int getStatus() -
getTitle
-
getCreator
-
equals
-
hashCode
public int hashCode() -
fromQuestion
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
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
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) -
toString
-