Class RoleWrapper

Object
com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<Role>
com.liferay.portal.kernel.model.RoleWrapper
All Implemented Interfaces:
AttachedModel, AuditedModel, BaseModel<Role>, CTModel<Role>, ClassedModel, ExternalReferenceCodeModel, LocalizedModel, ModelWrapper<Role>, MVCCModel, PersistedModel, Role, RoleModel, ShardedModel, StagedAuditedModel, StagedModel, TypedModel, Serializable, Cloneable, Comparable<Role>

public class RoleWrapper extends BaseModelWrapper<Role> implements ModelWrapper<Role>, Role

This class is a wrapper for Role.

Author:
Brian Wing Shun Chan
See Also:
{$generated.description}
  • Constructor Details

    • RoleWrapper

      public RoleWrapper(Role role)
  • Method Details

    • getModelAttributes

      public Map<String,Object> getModelAttributes()
      Specified by:
      getModelAttributes in interface BaseModel<Role>
    • setModelAttributes

      public void setModelAttributes(Map<String,Object> attributes)
      Specified by:
      setModelAttributes in interface BaseModel<Role>
    • cloneWithOriginalValues

      public Role cloneWithOriginalValues()
      Specified by:
      cloneWithOriginalValues in interface BaseModel<Role>
      Specified by:
      cloneWithOriginalValues in interface RoleModel
    • getAvailableLanguageIds

      public String[] getAvailableLanguageIds()
      Specified by:
      getAvailableLanguageIds in interface LocalizedModel
      Specified by:
      getAvailableLanguageIds in interface RoleModel
    • getClassName

      public String getClassName()
      Returns the fully qualified class name of this role.
      Specified by:
      getClassName in interface RoleModel
      Specified by:
      getClassName in interface TypedModel
      Returns:
      the fully qualified class name of this role
    • getClassNameId

      public long getClassNameId()
      Returns the class name ID of this role.
      Specified by:
      getClassNameId in interface RoleModel
      Specified by:
      getClassNameId in interface TypedModel
      Returns:
      the class name ID of this role
    • getClassPK

      public long getClassPK()
      Returns the class pk of this role.
      Specified by:
      getClassPK in interface AttachedModel
      Specified by:
      getClassPK in interface RoleModel
      Returns:
      the class pk of this role
    • getCompanyId

      public long getCompanyId()
      Returns the company ID of this role.
      Specified by:
      getCompanyId in interface AuditedModel
      Specified by:
      getCompanyId in interface RoleModel
      Specified by:
      getCompanyId in interface ShardedModel
      Specified by:
      getCompanyId in interface StagedModel
      Returns:
      the company ID of this role
    • getCreateDate

      public Date getCreateDate()
      Returns the create date of this role.
      Specified by:
      getCreateDate in interface AuditedModel
      Specified by:
      getCreateDate in interface RoleModel
      Specified by:
      getCreateDate in interface StagedModel
      Returns:
      the create date of this role
    • getCtCollectionId

      public long getCtCollectionId()
      Returns the ct collection ID of this role.
      Specified by:
      getCtCollectionId in interface CTModel<Role>
      Specified by:
      getCtCollectionId in interface RoleModel
      Returns:
      the ct collection ID of this role
    • getDefaultLanguageId

      public String getDefaultLanguageId()
      Specified by:
      getDefaultLanguageId in interface LocalizedModel
      Specified by:
      getDefaultLanguageId in interface RoleModel
    • getDescription

      public String getDescription()
      Returns the description of this role.
      Specified by:
      getDescription in interface RoleModel
      Returns:
      the description of this role
    • getDescription

      public String getDescription(Locale locale)
      Returns the localized description of this role in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface RoleModel
      Parameters:
      locale - the locale of the language
      Returns:
      the localized description of this role
    • getDescription

      public String getDescription(Locale locale, boolean useDefault)
      Returns the localized description of this role in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface RoleModel
      Parameters:
      locale - the local of the language
      useDefault - whether to use the default language if no localization exists for the requested language
      Returns:
      the localized description of this role. If useDefault is false and no localization exists for the requested language, an empty string will be returned.
    • getDescription

      public String getDescription(String languageId)
      Returns the localized description of this role in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface RoleModel
      Parameters:
      languageId - the ID of the language
      Returns:
      the localized description of this role
    • getDescription

      public String getDescription(String languageId, boolean useDefault)
      Returns the localized description of this role in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface RoleModel
      Parameters:
      languageId - the ID of the language
      useDefault - whether to use the default language if no localization exists for the requested language
      Returns:
      the localized description of this role
    • getDescriptionCurrentLanguageId

      public String getDescriptionCurrentLanguageId()
      Specified by:
      getDescriptionCurrentLanguageId in interface RoleModel
    • getDescriptionCurrentValue

      public String getDescriptionCurrentValue()
      Specified by:
      getDescriptionCurrentValue in interface RoleModel
    • getDescriptionMap

      public Map<Locale,String> getDescriptionMap()
      Returns a map of the locales and localized descriptions of this role.
      Specified by:
      getDescriptionMap in interface RoleModel
      Returns:
      the locales and localized descriptions of this role
    • getDescriptiveName

      public String getDescriptiveName() throws PortalException
      Specified by:
      getDescriptiveName in interface Role
      Throws:
      PortalException
    • getExternalReferenceCode

      public String getExternalReferenceCode()
      Returns the external reference code of this role.
      Specified by:
      getExternalReferenceCode in interface ExternalReferenceCodeModel
      Specified by:
      getExternalReferenceCode in interface RoleModel
      Returns:
      the external reference code of this role
    • getIconCssClass

      public String getIconCssClass()
      Specified by:
      getIconCssClass in interface Role
    • getModifiedDate

      public Date getModifiedDate()
      Returns the modified date of this role.
      Specified by:
      getModifiedDate in interface AuditedModel
      Specified by:
      getModifiedDate in interface RoleModel
      Specified by:
      getModifiedDate in interface StagedModel
      Returns:
      the modified date of this role
    • getMvccVersion

      public long getMvccVersion()
      Returns the mvcc version of this role.
      Specified by:
      getMvccVersion in interface MVCCModel
      Specified by:
      getMvccVersion in interface RoleModel
      Returns:
      the mvcc version of this role
    • getName

      public String getName()
      Returns the name of this role.
      Specified by:
      getName in interface RoleModel
      Returns:
      the name of this role
    • getPrimaryKey

      public long getPrimaryKey()
      Returns the primary key of this role.
      Specified by:
      getPrimaryKey in interface CTModel<Role>
      Specified by:
      getPrimaryKey in interface RoleModel
      Returns:
      the primary key of this role
    • getRoleId

      public long getRoleId()
      Returns the role ID of this role.
      Specified by:
      getRoleId in interface RoleModel
      Returns:
      the role ID of this role
    • getSubtype

      public String getSubtype()
      Returns the subtype of this role.
      Specified by:
      getSubtype in interface RoleModel
      Returns:
      the subtype of this role
    • getTitle

      public String getTitle()
      Returns the title of this role.
      Specified by:
      getTitle in interface RoleModel
      Returns:
      the title of this role
    • getTitle

      public String getTitle(Locale locale)
      Returns the localized title of this role in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface RoleModel
      Parameters:
      locale - the locale of the language
      Returns:
      the localized title of this role
    • getTitle

      public String getTitle(Locale locale, boolean useDefault)
      Returns the localized title of this role in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface RoleModel
      Parameters:
      locale - the local of the language
      useDefault - whether to use the default language if no localization exists for the requested language
      Returns:
      the localized title of this role. If useDefault is false and no localization exists for the requested language, an empty string will be returned.
    • getTitle

      public String getTitle(String languageId)
      Returns the localized title of this role in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface RoleModel
      Parameters:
      languageId - the ID of the language
      Returns:
      the localized title of this role
    • getTitle

      public String getTitle(String languageId, boolean useDefault)
      Returns the localized title of this role in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface RoleModel
      Parameters:
      languageId - the ID of the language
      useDefault - whether to use the default language if no localization exists for the requested language
      Returns:
      the localized title of this role
    • getTitleCurrentLanguageId

      public String getTitleCurrentLanguageId()
      Specified by:
      getTitleCurrentLanguageId in interface RoleModel
    • getTitleCurrentValue

      public String getTitleCurrentValue()
      Specified by:
      getTitleCurrentValue in interface RoleModel
    • getTitleMap

      public Map<Locale,String> getTitleMap()
      Returns a map of the locales and localized titles of this role.
      Specified by:
      getTitleMap in interface RoleModel
      Returns:
      the locales and localized titles of this role
    • getType

      public int getType()
      Returns the type of this role.
      Specified by:
      getType in interface RoleModel
      Returns:
      the type of this role
    • getTypeLabel

      public String getTypeLabel()
      Specified by:
      getTypeLabel in interface Role
    • getUserId

      public long getUserId()
      Returns the user ID of this role.
      Specified by:
      getUserId in interface AuditedModel
      Specified by:
      getUserId in interface RoleModel
      Returns:
      the user ID of this role
    • getUserName

      public String getUserName()
      Returns the user name of this role.
      Specified by:
      getUserName in interface AuditedModel
      Specified by:
      getUserName in interface RoleModel
      Returns:
      the user name of this role
    • getUserUuid

      public String getUserUuid()
      Returns the user uuid of this role.
      Specified by:
      getUserUuid in interface AuditedModel
      Specified by:
      getUserUuid in interface RoleModel
      Returns:
      the user uuid of this role
    • getUuid

      public String getUuid()
      Returns the uuid of this role.
      Specified by:
      getUuid in interface RoleModel
      Specified by:
      getUuid in interface StagedModel
      Returns:
      the uuid of this role
    • isSystem

      public boolean isSystem()
      Specified by:
      isSystem in interface Role
    • isTeam

      public boolean isTeam()
      Specified by:
      isTeam in interface Role
    • persist

      public void persist()
      Description copied from interface: PersistedModel
      Updates this model instance in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
      Specified by:
      persist in interface PersistedModel
    • prepareLocalizedFieldsForImport

      public void prepareLocalizedFieldsForImport() throws LocaleException
      Specified by:
      prepareLocalizedFieldsForImport in interface LocalizedModel
      Specified by:
      prepareLocalizedFieldsForImport in interface RoleModel
      Throws:
      LocaleException
    • prepareLocalizedFieldsForImport

      public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) throws LocaleException
      Specified by:
      prepareLocalizedFieldsForImport in interface LocalizedModel
      Specified by:
      prepareLocalizedFieldsForImport in interface RoleModel
      Throws:
      LocaleException
    • setClassName

      public void setClassName(String className)
      Specified by:
      setClassName in interface RoleModel
    • setClassNameId

      public void setClassNameId(long classNameId)
      Sets the class name ID of this role.
      Specified by:
      setClassNameId in interface RoleModel
      Specified by:
      setClassNameId in interface TypedModel
      Parameters:
      classNameId - the class name ID of this role
    • setClassPK

      public void setClassPK(long classPK)
      Sets the class pk of this role.
      Specified by:
      setClassPK in interface AttachedModel
      Specified by:
      setClassPK in interface RoleModel
      Parameters:
      classPK - the class pk of this role
    • setCompanyId

      public void setCompanyId(long companyId)
      Sets the company ID of this role.
      Specified by:
      setCompanyId in interface AuditedModel
      Specified by:
      setCompanyId in interface RoleModel
      Specified by:
      setCompanyId in interface ShardedModel
      Specified by:
      setCompanyId in interface StagedModel
      Parameters:
      companyId - the company ID of this role
    • setCreateDate

      public void setCreateDate(Date createDate)
      Sets the create date of this role.
      Specified by:
      setCreateDate in interface AuditedModel
      Specified by:
      setCreateDate in interface RoleModel
      Specified by:
      setCreateDate in interface StagedModel
      Parameters:
      createDate - the create date of this role
    • setCtCollectionId

      public void setCtCollectionId(long ctCollectionId)
      Sets the ct collection ID of this role.
      Specified by:
      setCtCollectionId in interface CTModel<Role>
      Specified by:
      setCtCollectionId in interface RoleModel
      Parameters:
      ctCollectionId - the ct collection ID of this role
    • setDescription

      public void setDescription(String description)
      Sets the description of this role.
      Specified by:
      setDescription in interface RoleModel
      Parameters:
      description - the description of this role
    • setDescription

      public void setDescription(String description, Locale locale)
      Sets the localized description of this role in the language.
      Specified by:
      setDescription in interface RoleModel
      Parameters:
      description - the localized description of this role
      locale - the locale of the language
    • setDescription

      public void setDescription(String description, Locale locale, Locale defaultLocale)
      Sets the localized description of this role in the language, and sets the default locale.
      Specified by:
      setDescription in interface RoleModel
      Parameters:
      description - the localized description of this role
      locale - the locale of the language
      defaultLocale - the default locale
    • setDescriptionCurrentLanguageId

      public void setDescriptionCurrentLanguageId(String languageId)
      Specified by:
      setDescriptionCurrentLanguageId in interface RoleModel
    • setDescriptionMap

      public void setDescriptionMap(Map<Locale,String> descriptionMap)
      Sets the localized descriptions of this role from the map of locales and localized descriptions.
      Specified by:
      setDescriptionMap in interface RoleModel
      Parameters:
      descriptionMap - the locales and localized descriptions of this role
    • setDescriptionMap

      public void setDescriptionMap(Map<Locale,String> descriptionMap, Locale defaultLocale)
      Sets the localized descriptions of this role from the map of locales and localized descriptions, and sets the default locale.
      Specified by:
      setDescriptionMap in interface RoleModel
      Parameters:
      descriptionMap - the locales and localized descriptions of this role
      defaultLocale - the default locale
    • setExternalReferenceCode

      public void setExternalReferenceCode(String externalReferenceCode)
      Sets the external reference code of this role.
      Specified by:
      setExternalReferenceCode in interface ExternalReferenceCodeModel
      Specified by:
      setExternalReferenceCode in interface RoleModel
      Parameters:
      externalReferenceCode - the external reference code of this role
    • setModifiedDate

      public void setModifiedDate(Date modifiedDate)
      Sets the modified date of this role.
      Specified by:
      setModifiedDate in interface AuditedModel
      Specified by:
      setModifiedDate in interface RoleModel
      Specified by:
      setModifiedDate in interface StagedModel
      Parameters:
      modifiedDate - the modified date of this role
    • setMvccVersion

      public void setMvccVersion(long mvccVersion)
      Sets the mvcc version of this role.
      Specified by:
      setMvccVersion in interface MVCCModel
      Specified by:
      setMvccVersion in interface RoleModel
      Parameters:
      mvccVersion - the mvcc version of this role
    • setName

      public void setName(String name)
      Sets the name of this role.
      Specified by:
      setName in interface RoleModel
      Parameters:
      name - the name of this role
    • setPrimaryKey

      public void setPrimaryKey(long primaryKey)
      Sets the primary key of this role.
      Specified by:
      setPrimaryKey in interface CTModel<Role>
      Specified by:
      setPrimaryKey in interface RoleModel
      Parameters:
      primaryKey - the primary key of this role
    • setRoleId

      public void setRoleId(long roleId)
      Sets the role ID of this role.
      Specified by:
      setRoleId in interface RoleModel
      Parameters:
      roleId - the role ID of this role
    • setSubtype

      public void setSubtype(String subtype)
      Sets the subtype of this role.
      Specified by:
      setSubtype in interface RoleModel
      Parameters:
      subtype - the subtype of this role
    • setTitle

      public void setTitle(String title)
      Sets the title of this role.
      Specified by:
      setTitle in interface RoleModel
      Parameters:
      title - the title of this role
    • setTitle

      public void setTitle(String title, Locale locale)
      Sets the localized title of this role in the language.
      Specified by:
      setTitle in interface RoleModel
      Parameters:
      title - the localized title of this role
      locale - the locale of the language
    • setTitle

      public void setTitle(String title, Locale locale, Locale defaultLocale)
      Sets the localized title of this role in the language, and sets the default locale.
      Specified by:
      setTitle in interface RoleModel
      Parameters:
      title - the localized title of this role
      locale - the locale of the language
      defaultLocale - the default locale
    • setTitleCurrentLanguageId

      public void setTitleCurrentLanguageId(String languageId)
      Specified by:
      setTitleCurrentLanguageId in interface RoleModel
    • setTitleMap

      public void setTitleMap(Map<Locale,String> titleMap)
      Sets the localized titles of this role from the map of locales and localized titles.
      Specified by:
      setTitleMap in interface RoleModel
      Parameters:
      titleMap - the locales and localized titles of this role
    • setTitleMap

      public void setTitleMap(Map<Locale,String> titleMap, Locale defaultLocale)
      Sets the localized titles of this role from the map of locales and localized titles, and sets the default locale.
      Specified by:
      setTitleMap in interface RoleModel
      Parameters:
      titleMap - the locales and localized titles of this role
      defaultLocale - the default locale
    • setType

      public void setType(int type)
      Sets the type of this role.
      Specified by:
      setType in interface RoleModel
      Parameters:
      type - the type of this role
    • setUserId

      public void setUserId(long userId)
      Sets the user ID of this role.
      Specified by:
      setUserId in interface AuditedModel
      Specified by:
      setUserId in interface RoleModel
      Parameters:
      userId - the user ID of this role
    • setUserName

      public void setUserName(String userName)
      Sets the user name of this role.
      Specified by:
      setUserName in interface AuditedModel
      Specified by:
      setUserName in interface RoleModel
      Parameters:
      userName - the user name of this role
    • setUserUuid

      public void setUserUuid(String userUuid)
      Sets the user uuid of this role.
      Specified by:
      setUserUuid in interface AuditedModel
      Specified by:
      setUserUuid in interface RoleModel
      Parameters:
      userUuid - the user uuid of this role
    • setUuid

      public void setUuid(String uuid)
      Sets the uuid of this role.
      Specified by:
      setUuid in interface RoleModel
      Specified by:
      setUuid in interface StagedModel
      Parameters:
      uuid - the uuid of this role
    • toXmlString

      public String toXmlString()
      Specified by:
      toXmlString in interface RoleModel
    • getAttributeGetterFunctions

      public Map<String,Function<Role,Object>> getAttributeGetterFunctions()
      Specified by:
      getAttributeGetterFunctions in interface BaseModel<Role>
    • getAttributeSetterBiConsumers

      public Map<String,BiConsumer<Role,Object>> getAttributeSetterBiConsumers()
      Specified by:
      getAttributeSetterBiConsumers in interface BaseModel<Role>
    • getStagedModelType

      public StagedModelType getStagedModelType()
      Specified by:
      getStagedModelType in interface StagedModel
    • wrap

      protected RoleWrapper wrap(Role role)
      Specified by:
      wrap in class BaseModelWrapper<Role>