Class CategoryImpl

java.lang.Object
com.commercetools.api.models.category.CategoryImpl
All Implemented Interfaces:
Category, CategoryMixin, BaseResource, Customizable<Category>, DomainResource<Category>, Identifiable<Category>, Referencable<Category>, ResourceIdentifiable<Category>, Versioned<Category>, WithKey, io.vrap.rmf.base.client.ModelBase

public class CategoryImpl extends Object implements Category, io.vrap.rmf.base.client.ModelBase
Category
  • Constructor Details

    • CategoryImpl

      public CategoryImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Category.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface Category
      Specified by:
      getId in interface DomainResource<Category>
      Specified by:
      getId in interface Identifiable<Category>
      Specified by:
      getId in interface Versioned<Category>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Category.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface Category
      Specified by:
      getVersion in interface DomainResource<Category>
      Specified by:
      getVersion in interface Versioned<Category>
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Category was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface Category
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Category was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface Category
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface Category
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface Category
      Returns:
      createdBy
    • getName

      public LocalizedString getName()

      Name of the Category.

      Specified by:
      getName in interface Category
      Returns:
      name
    • getSlug

      public LocalizedString getSlug()

      User-defined identifier used as a deep-link URL to the related Category per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern ^[A-Za-z0-9_-]{2,256}+$. For good performance, indexes are provided for the first 15 languages set in a Project.

      Specified by:
      getSlug in interface Category
      Returns:
      slug
    • getDescription

      public LocalizedString getDescription()

      Description of the Category.

      Specified by:
      getDescription in interface Category
      Returns:
      description
    • getAncestors

      public List<CategoryReference> getAncestors()

      Contains the parent path towards the root Category.

      Specified by:
      getAncestors in interface Category
      Returns:
      ancestors
    • getParent

      public CategoryReference getParent()

      Parent Category of this Category.

      Specified by:
      getParent in interface Category
      Returns:
      parent
    • getOrderHint

      public String getOrderHint()

      Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.

      Specified by:
      getOrderHint in interface Category
      Returns:
      orderHint
    • getExternalId

      public String getExternalId()

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      getExternalId in interface Category
      Returns:
      externalId
    • getMetaTitle

      public LocalizedString getMetaTitle()

      Name of the Category used by external search engines for improved search engine performance.

      Specified by:
      getMetaTitle in interface Category
      Returns:
      metaTitle
    • getMetaDescription

      public LocalizedString getMetaDescription()

      Description of the Category used by external search engines for improved search engine performance.

      Specified by:
      getMetaDescription in interface Category
      Returns:
      metaDescription
    • getMetaKeywords

      public LocalizedString getMetaKeywords()

      Keywords related to the Category for improved search engine performance.

      Specified by:
      getMetaKeywords in interface Category
      Returns:
      metaKeywords
    • getCustom

      public CustomFields getCustom()

      Custom Fields for the Category.

      Specified by:
      getCustom in interface Category
      Specified by:
      getCustom in interface Customizable<Category>
      Returns:
      custom
    • getAssets

      public List<Asset> getAssets()

      Media related to the Category.

      Specified by:
      getAssets in interface Category
      Returns:
      assets
    • getKey

      public String getKey()

      User-defined unique identifier of the Category.

      Specified by:
      getKey in interface Category
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setId

      public void setId(String id)
      Description copied from interface: Category

      Unique identifier of the Category.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Category
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: Category

      Current version of the Category.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface Category
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: Category

      Date and time (UTC) the Category was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface Category
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: Category

      Date and time (UTC) the Category was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface Category
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: Category

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface Category
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: Category

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface Category
      Parameters:
      createdBy - value to be set
    • setName

      public void setName(LocalizedString name)
      Description copied from interface: Category

      Name of the Category.

      Specified by:
      setName in interface Category
      Parameters:
      name - value to be set
    • setSlug

      public void setSlug(LocalizedString slug)
      Description copied from interface: Category

      User-defined identifier used as a deep-link URL to the related Category per Locale. A Category can have the same slug for different Locales, but they are unique across the Project. Valid slugs match the pattern ^[A-Za-z0-9_-]{2,256}+$. For good performance, indexes are provided for the first 15 languages set in a Project.

      Specified by:
      setSlug in interface Category
      Parameters:
      slug - value to be set
    • setDescription

      public void setDescription(LocalizedString description)
      Description copied from interface: Category

      Description of the Category.

      Specified by:
      setDescription in interface Category
      Parameters:
      description - value to be set
    • setAncestors

      public void setAncestors(CategoryReference... ancestors)
      Description copied from interface: Category

      Contains the parent path towards the root Category.

      Specified by:
      setAncestors in interface Category
      Parameters:
      ancestors - values to be set
    • setAncestors

      public void setAncestors(List<CategoryReference> ancestors)
      Description copied from interface: Category

      Contains the parent path towards the root Category.

      Specified by:
      setAncestors in interface Category
      Parameters:
      ancestors - values to be set
    • setParent

      public void setParent(CategoryReference parent)
      Description copied from interface: Category

      Parent Category of this Category.

      Specified by:
      setParent in interface Category
      Parameters:
      parent - value to be set
    • setOrderHint

      public void setOrderHint(String orderHint)
      Description copied from interface: Category

      Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.

      Specified by:
      setOrderHint in interface Category
      Parameters:
      orderHint - value to be set
    • setExternalId

      public void setExternalId(String externalId)
      Description copied from interface: Category

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      setExternalId in interface Category
      Parameters:
      externalId - value to be set
    • setMetaTitle

      public void setMetaTitle(LocalizedString metaTitle)
      Description copied from interface: Category

      Name of the Category used by external search engines for improved search engine performance.

      Specified by:
      setMetaTitle in interface Category
      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      public void setMetaDescription(LocalizedString metaDescription)
      Description copied from interface: Category

      Description of the Category used by external search engines for improved search engine performance.

      Specified by:
      setMetaDescription in interface Category
      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      public void setMetaKeywords(LocalizedString metaKeywords)
      Description copied from interface: Category

      Keywords related to the Category for improved search engine performance.

      Specified by:
      setMetaKeywords in interface Category
      Parameters:
      metaKeywords - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Category

      Custom Fields for the Category.

      Specified by:
      setCustom in interface Category
      Specified by:
      setCustom in interface Customizable<Category>
      Parameters:
      custom - value to be set
    • setAssets

      public void setAssets(Asset... assets)
      Description copied from interface: Category

      Media related to the Category.

      Specified by:
      setAssets in interface Category
      Parameters:
      assets - values to be set
    • setAssets

      public void setAssets(List<Asset> assets)
      Description copied from interface: Category

      Media related to the Category.

      Specified by:
      setAssets in interface Category
      Parameters:
      assets - values to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: Category

      User-defined unique identifier of the Category.

      Specified by:
      setKey in interface Category
      Parameters:
      key - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object