Class ProductImpl

java.lang.Object
com.commercetools.api.models.product.ProductImpl
All Implemented Interfaces:
BaseResource, DomainResource<Product>, Identifiable<Product>, Product, ProductMixin, Referencable<Product>, ResourceIdentifiable<Product>, Versioned<Product>, WithKey, io.vrap.rmf.base.client.ModelBase

public class ProductImpl extends Object implements Product, io.vrap.rmf.base.client.ModelBase

An abstract sellable good with a set of Attributes defined by a Product Type. Products themselves are not sellable. Instead, they act as a parent structure for Product Variants. Each Product must have at least one Product Variant, which is called the Master Variant. A single Product representation contains the current and the staged representation of its product data.

  • Constructor Details

    • ProductImpl

      public ProductImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Product.

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

      public Long getVersion()

      Current version of the Product.

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

      public ZonedDateTime getCreatedAt()

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

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

      public ZonedDateTime getLastModifiedAt()

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

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

      public LastModifiedBy getLastModifiedBy()

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

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

      public CreatedBy getCreatedBy()

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

      Specified by:
      getCreatedBy in interface Product
      Returns:
      createdBy
    • getKey

      public String getKey()

      User-defined unique identifier of the Product.

      This is different from the key of a ProductVariant.

      Specified by:
      getKey in interface Product
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getProductType

      public ProductTypeReference getProductType()

      The Product Type defining the Attributes of the Product. Cannot be changed.

      Specified by:
      getProductType in interface Product
      Returns:
      productType
    • getMasterData

      public ProductCatalogData getMasterData()

      Contains the current and the staged representation of the product information.

      Specified by:
      getMasterData in interface Product
      Returns:
      masterData
    • getTaxCategory

      public TaxCategoryReference getTaxCategory()

      The TaxCategory of the Product.

      Specified by:
      getTaxCategory in interface Product
      Returns:
      taxCategory
    • getState

      public StateReference getState()

      State of the Product.

      Specified by:
      getState in interface Product
      Returns:
      state
    • getReviewRatingStatistics

      public ReviewRatingStatistics getReviewRatingStatistics()

      Review statistics of the Product.

      Specified by:
      getReviewRatingStatistics in interface Product
      Returns:
      reviewRatingStatistics
    • getPriceMode

      public ProductPriceModeEnum getPriceMode()

      Type of Price to be used when looking up a price for the Product.

      Specified by:
      getPriceMode in interface Product
      Returns:
      priceMode
    • setId

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

      Unique identifier of the Product.

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

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

      Current version of the Product.

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

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

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

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

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

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

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

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

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

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

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

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

      Specified by:
      setCreatedBy in interface Product
      Parameters:
      createdBy - value to be set
    • setKey

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

      User-defined unique identifier of the Product.

      This is different from the key of a ProductVariant.

      Specified by:
      setKey in interface Product
      Parameters:
      key - value to be set
    • setProductType

      public void setProductType(ProductTypeReference productType)
      Description copied from interface: Product

      The Product Type defining the Attributes of the Product. Cannot be changed.

      Specified by:
      setProductType in interface Product
      Parameters:
      productType - value to be set
    • setMasterData

      public void setMasterData(ProductCatalogData masterData)
      Description copied from interface: Product

      Contains the current and the staged representation of the product information.

      Specified by:
      setMasterData in interface Product
      Parameters:
      masterData - value to be set
    • setTaxCategory

      public void setTaxCategory(TaxCategoryReference taxCategory)
      Description copied from interface: Product

      The TaxCategory of the Product.

      Specified by:
      setTaxCategory in interface Product
      Parameters:
      taxCategory - value to be set
    • setState

      public void setState(StateReference state)
      Description copied from interface: Product

      State of the Product.

      Specified by:
      setState in interface Product
      Parameters:
      state - value to be set
    • setReviewRatingStatistics

      public void setReviewRatingStatistics(ReviewRatingStatistics reviewRatingStatistics)
      Description copied from interface: Product

      Review statistics of the Product.

      Specified by:
      setReviewRatingStatistics in interface Product
      Parameters:
      reviewRatingStatistics - value to be set
    • setPriceMode

      public void setPriceMode(ProductPriceModeEnum priceMode)
      Description copied from interface: Product

      Type of Price to be used when looking up a price for the Product.

      Specified by:
      setPriceMode in interface Product
      Parameters:
      priceMode - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object