Class CPOptionWrapper

java.lang.Object
com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<CPOption>
com.liferay.commerce.product.model.CPOptionWrapper
All Implemented Interfaces:
CPOption, CPOptionModel, com.liferay.portal.kernel.model.AuditedModel, com.liferay.portal.kernel.model.BaseModel<CPOption>, com.liferay.portal.kernel.model.change.tracking.CTModel<CPOption>, com.liferay.portal.kernel.model.ClassedModel, com.liferay.portal.kernel.model.ExternalReferenceCodeModel, com.liferay.portal.kernel.model.LocalizedModel, com.liferay.portal.kernel.model.ModelWrapper<CPOption>, 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, Serializable, Cloneable, Comparable<CPOption>

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

This class is a wrapper for CPOption.

See Also:
Generated:
  • Constructor Details

    • CPOptionWrapper

      public CPOptionWrapper(CPOption cpOption)
  • Method Details

    • getModelAttributes

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

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

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

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

      public String getCommerceOptionTypeKey()
      Returns the commerce option type key of this cp option.
      Specified by:
      getCommerceOptionTypeKey in interface CPOptionModel
      Returns:
      the commerce option type key of this cp option
    • getCompanyId

      public long getCompanyId()
      Returns the company ID of this cp option.
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getCompanyId in interface CPOptionModel
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.ShardedModel
      Specified by:
      getCompanyId in interface com.liferay.portal.kernel.model.StagedModel
      Returns:
      the company ID of this cp option
    • getCPOptionId

      public long getCPOptionId()
      Returns the cp option ID of this cp option.
      Specified by:
      getCPOptionId in interface CPOptionModel
      Returns:
      the cp option ID of this cp option
    • getCPOptionValues

      public List<CPOptionValue> getCPOptionValues()
      Specified by:
      getCPOptionValues in interface CPOption
    • getCreateDate

      public Date getCreateDate()
      Returns the create date of this cp option.
      Specified by:
      getCreateDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      getCreateDate in interface CPOptionModel
      Specified by:
      getCreateDate in interface com.liferay.portal.kernel.model.StagedModel
      Returns:
      the create date of this cp option
    • getCtCollectionId

      public long getCtCollectionId()
      Returns the ct collection ID of this cp option.
      Specified by:
      getCtCollectionId in interface CPOptionModel
      Specified by:
      getCtCollectionId in interface com.liferay.portal.kernel.model.change.tracking.CTModel<CPOption>
      Returns:
      the ct collection ID of this cp option
    • getDefaultLanguageId

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

      public String getDescription()
      Returns the description of this cp option.
      Specified by:
      getDescription in interface CPOptionModel
      Returns:
      the description of this cp option
    • getDescription

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

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

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

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

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

      public Map<Locale,String> getDescriptionMap()
      Returns a map of the locales and localized descriptions of this cp option.
      Specified by:
      getDescriptionMap in interface CPOptionModel
      Returns:
      the locales and localized descriptions of this cp option
    • getExternalReferenceCode

      public String getExternalReferenceCode()
      Returns the external reference code of this cp option.
      Specified by:
      getExternalReferenceCode in interface CPOptionModel
      Specified by:
      getExternalReferenceCode in interface com.liferay.portal.kernel.model.ExternalReferenceCodeModel
      Returns:
      the external reference code of this cp option
    • getFacetable

      public boolean getFacetable()
      Returns the facetable of this cp option.
      Specified by:
      getFacetable in interface CPOptionModel
      Returns:
      the facetable of this cp option
    • getKey

      public String getKey()
      Returns the key of this cp option.
      Specified by:
      getKey in interface CPOptionModel
      Returns:
      the key of this cp option
    • getLastPublishDate

      public Date getLastPublishDate()
      Returns the last publish date of this cp option.
      Specified by:
      getLastPublishDate in interface CPOptionModel
      Returns:
      the last publish date of this cp option
    • getModifiedDate

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

      public long getMvccVersion()
      Returns the mvcc version of this cp option.
      Specified by:
      getMvccVersion in interface CPOptionModel
      Specified by:
      getMvccVersion in interface com.liferay.portal.kernel.model.MVCCModel
      Returns:
      the mvcc version of this cp option
    • getName

      public String getName()
      Returns the name of this cp option.
      Specified by:
      getName in interface CPOptionModel
      Returns:
      the name of this cp option
    • getName

      public String getName(Locale locale)
      Returns the localized name of this cp option in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getName in interface CPOptionModel
      Parameters:
      locale - the locale of the language
      Returns:
      the localized name of this cp option
    • getName

      public String getName(Locale locale, boolean useDefault)
      Returns the localized name of this cp option in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getName in interface CPOptionModel
      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 name of this cp option. If useDefault is false and no localization exists for the requested language, an empty string will be returned.
    • getName

      public String getName(String languageId)
      Returns the localized name of this cp option in the language. Uses the default language if no localization exists for the requested language.
      Specified by:
      getName in interface CPOptionModel
      Parameters:
      languageId - the ID of the language
      Returns:
      the localized name of this cp option
    • getName

      public String getName(String languageId, boolean useDefault)
      Returns the localized name of this cp option in the language, optionally using the default language if no localization exists for the requested language.
      Specified by:
      getName in interface CPOptionModel
      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 name of this cp option
    • getNameCurrentLanguageId

      public String getNameCurrentLanguageId()
      Specified by:
      getNameCurrentLanguageId in interface CPOptionModel
    • getNameCurrentValue

      public String getNameCurrentValue()
      Specified by:
      getNameCurrentValue in interface CPOptionModel
    • getNameMap

      public Map<Locale,String> getNameMap()
      Returns a map of the locales and localized names of this cp option.
      Specified by:
      getNameMap in interface CPOptionModel
      Returns:
      the locales and localized names of this cp option
    • getPrimaryKey

      public long getPrimaryKey()
      Returns the primary key of this cp option.
      Specified by:
      getPrimaryKey in interface CPOptionModel
      Specified by:
      getPrimaryKey in interface com.liferay.portal.kernel.model.change.tracking.CTModel<CPOption>
      Returns:
      the primary key of this cp option
    • getRequired

      public boolean getRequired()
      Returns the required of this cp option.
      Specified by:
      getRequired in interface CPOptionModel
      Returns:
      the required of this cp option
    • getSkuContributor

      public boolean getSkuContributor()
      Returns the sku contributor of this cp option.
      Specified by:
      getSkuContributor in interface CPOptionModel
      Returns:
      the sku contributor of this cp option
    • getUserId

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

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

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

      public String getUuid()
      Returns the uuid of this cp option.
      Specified by:
      getUuid in interface CPOptionModel
      Specified by:
      getUuid in interface com.liferay.portal.kernel.model.StagedModel
      Returns:
      the uuid of this cp option
    • isFacetable

      public boolean isFacetable()
      Returns true if this cp option is facetable.
      Specified by:
      isFacetable in interface CPOptionModel
      Returns:
      true if this cp option is facetable; false otherwise
    • isRequired

      public boolean isRequired()
      Returns true if this cp option is required.
      Specified by:
      isRequired in interface CPOptionModel
      Returns:
      true if this cp option is required; false otherwise
    • isSkuContributor

      public boolean isSkuContributor()
      Returns true if this cp option is sku contributor.
      Specified by:
      isSkuContributor in interface CPOptionModel
      Returns:
      true if this cp option is sku contributor; 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 CPOptionModel
      Specified by:
      prepareLocalizedFieldsForImport in interface com.liferay.portal.kernel.model.LocalizedModel
      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 CPOptionModel
      Specified by:
      prepareLocalizedFieldsForImport in interface com.liferay.portal.kernel.model.LocalizedModel
      Throws:
      com.liferay.portal.kernel.exception.LocaleException
    • setCommerceOptionTypeKey

      public void setCommerceOptionTypeKey(String commerceOptionTypeKey)
      Sets the commerce option type key of this cp option.
      Specified by:
      setCommerceOptionTypeKey in interface CPOptionModel
      Parameters:
      commerceOptionTypeKey - the commerce option type key of this cp option
    • setCompanyId

      public void setCompanyId(long companyId)
      Sets the company ID of this cp option.
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setCompanyId in interface CPOptionModel
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.ShardedModel
      Specified by:
      setCompanyId in interface com.liferay.portal.kernel.model.StagedModel
      Parameters:
      companyId - the company ID of this cp option
    • setCPOptionId

      public void setCPOptionId(long CPOptionId)
      Sets the cp option ID of this cp option.
      Specified by:
      setCPOptionId in interface CPOptionModel
      Parameters:
      CPOptionId - the cp option ID of this cp option
    • setCreateDate

      public void setCreateDate(Date createDate)
      Sets the create date of this cp option.
      Specified by:
      setCreateDate in interface com.liferay.portal.kernel.model.AuditedModel
      Specified by:
      setCreateDate in interface CPOptionModel
      Specified by:
      setCreateDate in interface com.liferay.portal.kernel.model.StagedModel
      Parameters:
      createDate - the create date of this cp option
    • setCtCollectionId

      public void setCtCollectionId(long ctCollectionId)
      Sets the ct collection ID of this cp option.
      Specified by:
      setCtCollectionId in interface CPOptionModel
      Specified by:
      setCtCollectionId in interface com.liferay.portal.kernel.model.change.tracking.CTModel<CPOption>
      Parameters:
      ctCollectionId - the ct collection ID of this cp option
    • setDescription

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

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

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

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

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

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

      public void setExternalReferenceCode(String externalReferenceCode)
      Sets the external reference code of this cp option.
      Specified by:
      setExternalReferenceCode in interface CPOptionModel
      Specified by:
      setExternalReferenceCode in interface com.liferay.portal.kernel.model.ExternalReferenceCodeModel
      Parameters:
      externalReferenceCode - the external reference code of this cp option
    • setFacetable

      public void setFacetable(boolean facetable)
      Sets whether this cp option is facetable.
      Specified by:
      setFacetable in interface CPOptionModel
      Parameters:
      facetable - the facetable of this cp option
    • setKey

      public void setKey(String key)
      Sets the key of this cp option.
      Specified by:
      setKey in interface CPOptionModel
      Parameters:
      key - the key of this cp option
    • setLastPublishDate

      public void setLastPublishDate(Date lastPublishDate)
      Sets the last publish date of this cp option.
      Specified by:
      setLastPublishDate in interface CPOptionModel
      Parameters:
      lastPublishDate - the last publish date of this cp option
    • setModifiedDate

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

      public void setMvccVersion(long mvccVersion)
      Sets the mvcc version of this cp option.
      Specified by:
      setMvccVersion in interface CPOptionModel
      Specified by:
      setMvccVersion in interface com.liferay.portal.kernel.model.MVCCModel
      Parameters:
      mvccVersion - the mvcc version of this cp option
    • setName

      public void setName(String name)
      Sets the name of this cp option.
      Specified by:
      setName in interface CPOptionModel
      Parameters:
      name - the name of this cp option
    • setName

      public void setName(String name, Locale locale)
      Sets the localized name of this cp option in the language.
      Specified by:
      setName in interface CPOptionModel
      Parameters:
      name - the localized name of this cp option
      locale - the locale of the language
    • setName

      public void setName(String name, Locale locale, Locale defaultLocale)
      Sets the localized name of this cp option in the language, and sets the default locale.
      Specified by:
      setName in interface CPOptionModel
      Parameters:
      name - the localized name of this cp option
      locale - the locale of the language
      defaultLocale - the default locale
    • setNameCurrentLanguageId

      public void setNameCurrentLanguageId(String languageId)
      Specified by:
      setNameCurrentLanguageId in interface CPOptionModel
    • setNameMap

      public void setNameMap(Map<Locale,String> nameMap)
      Sets the localized names of this cp option from the map of locales and localized names.
      Specified by:
      setNameMap in interface CPOptionModel
      Parameters:
      nameMap - the locales and localized names of this cp option
    • setNameMap

      public void setNameMap(Map<Locale,String> nameMap, Locale defaultLocale)
      Sets the localized names of this cp option from the map of locales and localized names, and sets the default locale.
      Specified by:
      setNameMap in interface CPOptionModel
      Parameters:
      nameMap - the locales and localized names of this cp option
      defaultLocale - the default locale
    • setPrimaryKey

      public void setPrimaryKey(long primaryKey)
      Sets the primary key of this cp option.
      Specified by:
      setPrimaryKey in interface CPOptionModel
      Specified by:
      setPrimaryKey in interface com.liferay.portal.kernel.model.change.tracking.CTModel<CPOption>
      Parameters:
      primaryKey - the primary key of this cp option
    • setRequired

      public void setRequired(boolean required)
      Sets whether this cp option is required.
      Specified by:
      setRequired in interface CPOptionModel
      Parameters:
      required - the required of this cp option
    • setSkuContributor

      public void setSkuContributor(boolean skuContributor)
      Sets whether this cp option is sku contributor.
      Specified by:
      setSkuContributor in interface CPOptionModel
      Parameters:
      skuContributor - the sku contributor of this cp option
    • setUserId

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

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

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

      public void setUuid(String uuid)
      Sets the uuid of this cp option.
      Specified by:
      setUuid in interface CPOptionModel
      Specified by:
      setUuid in interface com.liferay.portal.kernel.model.StagedModel
      Parameters:
      uuid - the uuid of this cp option
    • toXmlString

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

      public Map<String,Function<CPOption,Object>> getAttributeGetterFunctions()
      Specified by:
      getAttributeGetterFunctions in interface com.liferay.portal.kernel.model.BaseModel<CPOption>
    • getAttributeSetterBiConsumers

      public Map<String,BiConsumer<CPOption,Object>> getAttributeSetterBiConsumers()
      Specified by:
      getAttributeSetterBiConsumers in interface com.liferay.portal.kernel.model.BaseModel<CPOption>
    • getStagedModelType

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

      protected CPOptionWrapper wrap(CPOption cpOption)
      Specified by:
      wrap in class com.liferay.portal.kernel.model.wrapper.BaseModelWrapper<CPOption>