Class SXPElementWrapper

java.lang.Object
com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<SXPElement>
com.liferay.search.experiences.model.SXPElementWrapper
All Implemented Interfaces:
com.liferay.portal.kernel.model.AuditedModel, com.liferay.portal.kernel.model.BaseModel<SXPElement>, com.liferay.portal.kernel.model.ClassedModel, com.liferay.portal.kernel.model.ExternalReferenceCodeModel, com.liferay.portal.kernel.model.LocalizedModel, com.liferay.portal.kernel.model.ModelWrapper<SXPElement>, com.liferay.portal.kernel.model.MVCCModel, com.liferay.portal.kernel.model.PersistedModel, com.liferay.portal.kernel.model.ShardedModel, com.liferay.portal.kernel.model.StagedAuditedModel, com.liferay.portal.kernel.model.StagedModel, SXPElement, SXPElementModel, Serializable, Cloneable, Comparable<SXPElement>

public class SXPElementWrapper extends com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<SXPElement> implements com.liferay.portal.kernel.model.ModelWrapper<SXPElement>, SXPElement

This class is a wrapper for SXPElement.

See Also:
Generated:
  • Constructor Details

    • SXPElementWrapper

      public SXPElementWrapper(SXPElement sxpElement)
  • Method Details

    • getModelAttributes

      public Map<String,Object> getModelAttributes()
      Specified by:
      getModelAttributes in interface com.liferay.portal.kernel.model.BaseModel<SXPElement>
    • setModelAttributes

      public void setModelAttributes(Map<String,Object> attributes)
      Specified by:
      setModelAttributes in interface com.liferay.portal.kernel.model.BaseModel<SXPElement>
    • cloneWithOriginalValues

      public SXPElement cloneWithOriginalValues()
      Specified by:
      cloneWithOriginalValues in interface com.liferay.portal.kernel.model.BaseModel<SXPElement>
      Specified by:
      cloneWithOriginalValues in interface SXPElementModel
    • getAvailableLanguageIds

      public String[] getAvailableLanguageIds()
      Specified by:
      getAvailableLanguageIds in interface com.liferay.portal.kernel.model.LocalizedModel
      Specified by:
      getAvailableLanguageIds in interface SXPElementModel
    • getCompanyId

      public long getCompanyId()
      Returns the company ID of this sxp element.
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.ShardedModel
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      getCompanyId in interface SXPElementModel
      Returns:
      the company ID of this sxp element
    • getCreateDate

      public Date getCreateDate()
      Returns the create date of this sxp element.
      Specified by:
      getCreateDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getCreateDate in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      getCreateDate in interface SXPElementModel
      Returns:
      the create date of this sxp element
    • getDefaultLanguageId

      public String getDefaultLanguageId()
      Specified by:
      getDefaultLanguageId in interface com.liferay.portal.kernel.model.LocalizedModel
      Specified by:
      getDefaultLanguageId in interface SXPElementModel
    • getDescription

      public String getDescription()
      Returns the description of this sxp element.
      Specified by:
      getDescription in interface SXPElementModel
      Returns:
      the description of this sxp element
    • getDescription

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

      public String getDescription(Locale locale, boolean useDefault)
      Returns the localized description of this sxp element in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface SXPElementModel
      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 sxp element. 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 sxp element in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface SXPElementModel
      Parameters:
      languageId - the ID of the language
      Returns:
      the localized description of this sxp element
    • getDescription

      public String getDescription(String languageId, boolean useDefault)
      Returns the localized description of this sxp element in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getDescription in interface SXPElementModel
      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 sxp element
    • getDescriptionCurrentLanguageId

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

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

      public Map<Locale,String> getDescriptionMap()
      Returns a map of the locales and localized descriptions of this sxp element.
      Specified by:
      getDescriptionMap in interface SXPElementModel
      Returns:
      the locales and localized descriptions of this sxp element
    • getElementDefinitionJSON

      public String getElementDefinitionJSON()
      Returns the element definition json of this sxp element.
      Specified by:
      getElementDefinitionJSON in interface SXPElementModel
      Returns:
      the element definition json of this sxp element
    • getExternalReferenceCode

      public String getExternalReferenceCode()
      Returns the external reference code of this sxp element.
      Specified by:
      getExternalReferenceCode in interface com.liferay.portal.kernel.model.ExternalReferenceCodeModel
      Specified by:
      getExternalReferenceCode in interface SXPElementModel
      Returns:
      the external reference code of this sxp element
    • getFallbackDescription

      public String getFallbackDescription()
      Returns the fallback description of this sxp element.
      Specified by:
      getFallbackDescription in interface SXPElementModel
      Returns:
      the fallback description of this sxp element
    • getFallbackTitle

      public String getFallbackTitle()
      Returns the fallback title of this sxp element.
      Specified by:
      getFallbackTitle in interface SXPElementModel
      Returns:
      the fallback title of this sxp element
    • getHidden

      public boolean getHidden()
      Returns the hidden of this sxp element.
      Specified by:
      getHidden in interface SXPElementModel
      Returns:
      the hidden of this sxp element
    • getModifiedDate

      public Date getModifiedDate()
      Returns the modified date of this sxp element.
      Specified by:
      getModifiedDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getModifiedDate in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      getModifiedDate in interface SXPElementModel
      Returns:
      the modified date of this sxp element
    • getMvccVersion

      public long getMvccVersion()
      Returns the mvcc version of this sxp element.
      Specified by:
      getMvccVersion in interface com.liferay.portal.kernel.model.MVCCModel
      Specified by:
      getMvccVersion in interface SXPElementModel
      Returns:
      the mvcc version of this sxp element
    • getPrimaryKey

      public long getPrimaryKey()
      Returns the primary key of this sxp element.
      Specified by:
      getPrimaryKey in interface SXPElementModel
      Returns:
      the primary key of this sxp element
    • getReadOnly

      public boolean getReadOnly()
      Returns the read only of this sxp element.
      Specified by:
      getReadOnly in interface SXPElementModel
      Returns:
      the read only of this sxp element
    • getSchemaVersion

      public String getSchemaVersion()
      Returns the schema version of this sxp element.
      Specified by:
      getSchemaVersion in interface SXPElementModel
      Returns:
      the schema version of this sxp element
    • getStatus

      public int getStatus()
      Returns the status of this sxp element.
      Specified by:
      getStatus in interface SXPElementModel
      Returns:
      the status of this sxp element
    • getSXPElementId

      public long getSXPElementId()
      Returns the sxp element ID of this sxp element.
      Specified by:
      getSXPElementId in interface SXPElementModel
      Returns:
      the sxp element ID of this sxp element
    • getTitle

      public String getTitle()
      Returns the title of this sxp element.
      Specified by:
      getTitle in interface SXPElementModel
      Returns:
      the title of this sxp element
    • getTitle

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

      public String getTitle(Locale locale, boolean useDefault)
      Returns the localized title of this sxp element in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface SXPElementModel
      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 sxp element. 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 sxp element in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface SXPElementModel
      Parameters:
      languageId - the ID of the language
      Returns:
      the localized title of this sxp element
    • getTitle

      public String getTitle(String languageId, boolean useDefault)
      Returns the localized title of this sxp element in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getTitle in interface SXPElementModel
      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 sxp element
    • getTitleCurrentLanguageId

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

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

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

      public int getType()
      Returns the type of this sxp element.
      Specified by:
      getType in interface SXPElementModel
      Returns:
      the type of this sxp element
    • getUserId

      public long getUserId()
      Returns the user ID of this sxp element.
      Specified by:
      getUserId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getUserId in interface SXPElementModel
      Returns:
      the user ID of this sxp element
    • getUserName

      public String getUserName()
      Returns the user name of this sxp element.
      Specified by:
      getUserName in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getUserName in interface SXPElementModel
      Returns:
      the user name of this sxp element
    • getUserUuid

      public String getUserUuid()
      Returns the user uuid of this sxp element.
      Specified by:
      getUserUuid in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getUserUuid in interface SXPElementModel
      Returns:
      the user uuid of this sxp element
    • getUuid

      public String getUuid()
      Returns the uuid of this sxp element.
      Specified by:
      getUuid in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      getUuid in interface SXPElementModel
      Returns:
      the uuid of this sxp element
    • getVersion

      public String getVersion()
      Returns the version of this sxp element.
      Specified by:
      getVersion in interface SXPElementModel
      Returns:
      the version of this sxp element
    • isHidden

      public boolean isHidden()
      Returns true if this sxp element is hidden.
      Specified by:
      isHidden in interface SXPElementModel
      Returns:
      true if this sxp element is hidden; false otherwise
    • isReadOnly

      public boolean isReadOnly()
      Returns true if this sxp element is read only.
      Specified by:
      isReadOnly in interface SXPElementModel
      Returns:
      true if this sxp element is read only; false otherwise
    • persist

      public void persist()
      Specified by:
      persist in interface com.liferay.portal.kernel.model.PersistedModel
    • prepareLocalizedFieldsForImport

      public void prepareLocalizedFieldsForImport() throws com.liferay.portal.kernel.exception.LocaleException
      Specified by:
      prepareLocalizedFieldsForImport in interface com.liferay.portal.kernel.model.LocalizedModel
      Specified by:
      prepareLocalizedFieldsForImport in interface SXPElementModel
      Throws:
      com.liferay.portal.kernel.exception.LocaleException
    • prepareLocalizedFieldsForImport

      public void prepareLocalizedFieldsForImport(Locale defaultImportLocale) throws com.liferay.portal.kernel.exception.LocaleException
      Specified by:
      prepareLocalizedFieldsForImport in interface com.liferay.portal.kernel.model.LocalizedModel
      Specified by:
      prepareLocalizedFieldsForImport in interface SXPElementModel
      Throws:
      com.liferay.portal.kernel.exception.LocaleException
    • setCompanyId

      public void setCompanyId(long companyId)
      Sets the company ID of this sxp element.
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.ShardedModel
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      setCompanyId in interface SXPElementModel
      Parameters:
      companyId - the company ID of this sxp element
    • setCreateDate

      public void setCreateDate(Date createDate)
      Sets the create date of this sxp element.
      Specified by:
      setCreateDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setCreateDate in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      setCreateDate in interface SXPElementModel
      Parameters:
      createDate - the create date of this sxp element
    • setDescription

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

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

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

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

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

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

      public void setElementDefinitionJSON(String elementDefinitionJSON)
      Sets the element definition json of this sxp element.
      Specified by:
      setElementDefinitionJSON in interface SXPElementModel
      Parameters:
      elementDefinitionJSON - the element definition json of this sxp element
    • setExternalReferenceCode

      public void setExternalReferenceCode(String externalReferenceCode)
      Sets the external reference code of this sxp element.
      Specified by:
      setExternalReferenceCode in interface com.liferay.portal.kernel.model.ExternalReferenceCodeModel
      Specified by:
      setExternalReferenceCode in interface SXPElementModel
      Parameters:
      externalReferenceCode - the external reference code of this sxp element
    • setFallbackDescription

      public void setFallbackDescription(String fallbackDescription)
      Sets the fallback description of this sxp element.
      Specified by:
      setFallbackDescription in interface SXPElementModel
      Parameters:
      fallbackDescription - the fallback description of this sxp element
    • setFallbackTitle

      public void setFallbackTitle(String fallbackTitle)
      Sets the fallback title of this sxp element.
      Specified by:
      setFallbackTitle in interface SXPElementModel
      Parameters:
      fallbackTitle - the fallback title of this sxp element
    • setHidden

      public void setHidden(boolean hidden)
      Sets whether this sxp element is hidden.
      Specified by:
      setHidden in interface SXPElementModel
      Parameters:
      hidden - the hidden of this sxp element
    • setModifiedDate

      public void setModifiedDate(Date modifiedDate)
      Sets the modified date of this sxp element.
      Specified by:
      setModifiedDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setModifiedDate in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      setModifiedDate in interface SXPElementModel
      Parameters:
      modifiedDate - the modified date of this sxp element
    • setMvccVersion

      public void setMvccVersion(long mvccVersion)
      Sets the mvcc version of this sxp element.
      Specified by:
      setMvccVersion in interface com.liferay.portal.kernel.model.MVCCModel
      Specified by:
      setMvccVersion in interface SXPElementModel
      Parameters:
      mvccVersion - the mvcc version of this sxp element
    • setPrimaryKey

      public void setPrimaryKey(long primaryKey)
      Sets the primary key of this sxp element.
      Specified by:
      setPrimaryKey in interface SXPElementModel
      Parameters:
      primaryKey - the primary key of this sxp element
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Sets whether this sxp element is read only.
      Specified by:
      setReadOnly in interface SXPElementModel
      Parameters:
      readOnly - the read only of this sxp element
    • setSchemaVersion

      public void setSchemaVersion(String schemaVersion)
      Sets the schema version of this sxp element.
      Specified by:
      setSchemaVersion in interface SXPElementModel
      Parameters:
      schemaVersion - the schema version of this sxp element
    • setStatus

      public void setStatus(int status)
      Sets the status of this sxp element.
      Specified by:
      setStatus in interface SXPElementModel
      Parameters:
      status - the status of this sxp element
    • setSXPElementId

      public void setSXPElementId(long sxpElementId)
      Sets the sxp element ID of this sxp element.
      Specified by:
      setSXPElementId in interface SXPElementModel
      Parameters:
      sxpElementId - the sxp element ID of this sxp element
    • setTitle

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

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

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

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

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

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

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

      public void setUserId(long userId)
      Sets the user ID of this sxp element.
      Specified by:
      setUserId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setUserId in interface SXPElementModel
      Parameters:
      userId - the user ID of this sxp element
    • setUserName

      public void setUserName(String userName)
      Sets the user name of this sxp element.
      Specified by:
      setUserName in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setUserName in interface SXPElementModel
      Parameters:
      userName - the user name of this sxp element
    • setUserUuid

      public void setUserUuid(String userUuid)
      Sets the user uuid of this sxp element.
      Specified by:
      setUserUuid in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setUserUuid in interface SXPElementModel
      Parameters:
      userUuid - the user uuid of this sxp element
    • setUuid

      public void setUuid(String uuid)
      Sets the uuid of this sxp element.
      Specified by:
      setUuid in interface com.liferay.portal.kernel.model.StagedModel
      Specified by:
      setUuid in interface SXPElementModel
      Parameters:
      uuid - the uuid of this sxp element
    • setVersion

      public void setVersion(String version)
      Sets the version of this sxp element.
      Specified by:
      setVersion in interface SXPElementModel
      Parameters:
      version - the version of this sxp element
    • toXmlString

      public String toXmlString()
      Specified by:
      toXmlString in interface SXPElementModel
    • getStagedModelType

      public com.liferay.exportimport.kernel.lar.StagedModelType getStagedModelType()
      Specified by:
      getStagedModelType in interface com.liferay.portal.kernel.model.StagedModel
    • wrap

      protected SXPElementWrapper wrap(SXPElement sxpElement)
      Specified by:
      wrap in class com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<SXPElement>