Class SuggestionBox
java.lang.Object
org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity<E,I>
org.silverpeas.core.persistence.datasource.model.jpa.SilverpeasJpaEntity<SuggestionBox,org.silverpeas.core.persistence.datasource.model.identifier.UuidIdentifier>
org.silverpeas.components.suggestionbox.model.SuggestionBox
- All Implemented Interfaces:
Serializable,org.silverpeas.core.persistence.datasource.model.Entity<SuggestionBox,,org.silverpeas.core.persistence.datasource.model.identifier.UuidIdentifier> org.silverpeas.core.persistence.datasource.model.IdentifiableEntity
@Entity
public class SuggestionBox
extends org.silverpeas.core.persistence.datasource.model.jpa.SilverpeasJpaEntity<SuggestionBox,org.silverpeas.core.persistence.datasource.model.identifier.UuidIdentifier>
This entity represents a suggestion box.
- Author:
- Yohann Chastagnier
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSuggestionBox(String componentInstanceId) Creates a new suggestion box with the specified title and with the specified short description. -
Method Summary
Modifier and TypeMethodDescriptionstatic SuggestionBoxgetByComponentInstanceId(String suggestionBoxId) Gets the suggestion box represented by the specified identifier.Gets the component instance identifier which is the identifier of a suggestion box.getDescription(String language) Gets the description of the suggestion box according to requested language.org.silverpeas.core.admin.user.model.SilverpeasRolegetHighestUserRole(org.silverpeas.core.admin.user.model.User user) Gets the highest role of the specified user on the suggestion box.Gets the title of the suggestion box according to requested language.protected List<Suggestion>Gets the actual persisted suggestions in this suggestion box.Methods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.SilverpeasJpaEntity
createdBy, createdBy, createdBy, equals, getCreationDate, getCreator, getCreatorId, getLastUpdateDate, getLastUpdater, getLastUpdaterId, getVersion, hasBeenModified, hashCode, lastUpdatedBy, markAsModified, performBeforePersist, performBeforeRemove, performBeforeUpdate, setCreationDate, setCreator, setLastUpdateDate, setLastUpdater, setVersion, updatedBy, updatedByMethods inherited from class org.silverpeas.core.persistence.datasource.model.jpa.AbstractJpaEntity
getId, getNativeId, isPersisted, setIdMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.silverpeas.core.persistence.datasource.model.IdentifiableEntity
getId, isPersisted
-
Constructor Details
-
SuggestionBox
Creates a new suggestion box with the specified title and with the specified short description.- Parameters:
componentInstanceId- the unique identifier of the application to which the suggestion box belongs.
-
SuggestionBox
protected SuggestionBox()
-
-
Method Details
-
getByComponentInstanceId
Gets the suggestion box represented by the specified identifier.- Parameters:
suggestionBoxId- the identifier of the required suggestion box.- Returns:
- the suggestion box instance if exists, null otherwise.
-
getComponentInstanceId
Gets the component instance identifier which is the identifier of a suggestion box.- Returns:
- the suggestion box component identifier.
-
getTitle
Gets the title of the suggestion box according to requested language.- Parameters:
language- the language at which the title has to be returned.- Returns:
- the suggestion box title according to requested language.
-
getDescription
Gets the description of the suggestion box according to requested language.- Parameters:
language- the language at which the title has to be returned.- Returns:
- the description box description according to requested language.
-
getSuggestions
-
persistedSuggestions
Gets the actual persisted suggestions in this suggestion box. This operation is a side effect one as it performs some accesses to the underlying data source.- Returns:
- the list of actual suggestions in this suggestion box.
-
getHighestUserRole
public org.silverpeas.core.admin.user.model.SilverpeasRole getHighestUserRole(org.silverpeas.core.admin.user.model.User user) Gets the highest role of the specified user on the suggestion box.- Parameters:
user- the aimed user.- Returns:
- a
SilverpeasRoleinstance.
-