Interface ProductProjection

All Superinterfaces:
BaseResource, DomainResource<ProductProjection>, Identifiable<ProductProjection>, MetaAttributes, ProductDataLike, ProductProjectionMixin, Versioned<ProductProjection>, WithKey, WithLocalizedSlug

ProductProjection
Example to create an instance using the builder pattern

     ProductProjection productProjection = ProductProjection.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .productType(productTypeBuilder -> productTypeBuilder)
             .name(nameBuilder -> nameBuilder)
             .slug(slugBuilder -> slugBuilder)
             .plusCategories(categoriesBuilder -> categoriesBuilder)
             .masterVariant(masterVariantBuilder -> masterVariantBuilder)
             .plusVariants(variantsBuilder -> variantsBuilder)
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the Product.

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

      @NotNull @NotNull Long getVersion()

      Current version of the Product.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<ProductProjection>
      Specified by:
      getVersion in interface Versioned<ProductProjection>
      Returns:
      version
    • getKey

      String getKey()

      User-defined unique identifier of the Product.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

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

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

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

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

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getProductType

      @NotNull @Valid @NotNull @Valid ProductTypeReference getProductType()

      The ProductType defining the Attributes of the Product.

      Returns:
      productType
    • getName

      @NotNull @Valid @NotNull @Valid LocalizedString getName()

      Name of the Product.

      Specified by:
      getName in interface ProductDataLike
      Returns:
      name
    • getDescription

      @Valid @Valid LocalizedString getDescription()

      Description of the Product.

      Specified by:
      getDescription in interface ProductDataLike
      Returns:
      description
    • getSlug

      @NotNull @Valid @NotNull @Valid LocalizedString getSlug()

      User-defined identifier used in a deep-link URL for the Product. Must be unique across a Project, but can be the same for Products in different locales. Matches the pattern [a-zA-Z0-9_\-]{2,256}. For good performance, indexes are provided for the first 15 languages set in the Project.

      Specified by:
      getSlug in interface ProductDataLike
      Specified by:
      getSlug in interface WithLocalizedSlug
      Returns:
      slug
    • getCategories

      @NotNull @Valid @NotNull @Valid List<CategoryReference> getCategories()

      Categories assigned to the Product.

      Specified by:
      getCategories in interface ProductDataLike
      Returns:
      categories
    • getCategoryOrderHints

      @Valid @Valid CategoryOrderHints getCategoryOrderHints()

      Order of Product in Categories.

      Specified by:
      getCategoryOrderHints in interface ProductDataLike
      Returns:
      categoryOrderHints
    • getMetaTitle

      @Valid @Valid LocalizedString getMetaTitle()

      Title of the Product displayed in search results.

      Specified by:
      getMetaTitle in interface MetaAttributes
      Specified by:
      getMetaTitle in interface ProductDataLike
      Returns:
      metaTitle
    • getMetaDescription

      @Valid @Valid LocalizedString getMetaDescription()

      Description of the Product displayed in search results below the meta title.

      Specified by:
      getMetaDescription in interface MetaAttributes
      Specified by:
      getMetaDescription in interface ProductDataLike
      Returns:
      metaDescription
    • getMetaKeywords

      @Valid @Valid LocalizedString getMetaKeywords()

      Keywords that give additional information about the Product to search engines.

      Specified by:
      getMetaKeywords in interface MetaAttributes
      Specified by:
      getMetaKeywords in interface ProductDataLike
      Returns:
      metaKeywords
    • getSearchKeywords

      @Valid @Valid SearchKeywords getSearchKeywords()

      Used by Product Suggestions, but is also considered for a full text search.

      Specified by:
      getSearchKeywords in interface ProductDataLike
      Returns:
      searchKeywords
    • getHasStagedChanges

      Boolean getHasStagedChanges()

      true if the staged data is different from the current data.

      Returns:
      hasStagedChanges
    • getPublished

      Boolean getPublished()

      true if the Product is published.

      Returns:
      published
    • getMasterVariant

      @NotNull @Valid @NotNull @Valid ProductVariant getMasterVariant()

      The Master Variant of the Product.

      Specified by:
      getMasterVariant in interface ProductDataLike
      Returns:
      masterVariant
      See Also:
    • getVariants

      @NotNull @Valid @NotNull @Valid List<ProductVariant> getVariants()

      Additional Product Variants.

      Specified by:
      getVariants in interface ProductDataLike
      Returns:
      variants
      See Also:
    • getTaxCategory

      @Valid @Valid TaxCategoryReference getTaxCategory()

      The TaxCategory of the Product.

      Returns:
      taxCategory
    • getState

      @Valid @Valid StateReference getState()

      State of the Product.

      Returns:
      state
    • getReviewRatingStatistics

      @Valid @Valid ReviewRatingStatistics getReviewRatingStatistics()

      Review statistics of the Product.

      Returns:
      reviewRatingStatistics
    • getPriceMode

      ProductPriceModeEnum getPriceMode()

      Indicates whether the Prices of the Product Projection are embedded or standalone. Projecting Prices only works with Embedded, there is currently no support for Standalone.

      Returns:
      priceMode
    • setId

      void setId(String id)

      Unique identifier of the Product.

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

      void setVersion(Long version)

      Current version of the Product.

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

      void setKey(String key)

      User-defined unique identifier of the Product.

      Parameters:
      key - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

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

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

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

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

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

      void setProductType(ProductTypeReference productType)

      The ProductType defining the Attributes of the Product.

      Parameters:
      productType - value to be set
    • setName

      void setName(LocalizedString name)

      Name of the Product.

      Parameters:
      name - value to be set
    • setDescription

      void setDescription(LocalizedString description)

      Description of the Product.

      Parameters:
      description - value to be set
    • setSlug

      void setSlug(LocalizedString slug)

      User-defined identifier used in a deep-link URL for the Product. Must be unique across a Project, but can be the same for Products in different locales. Matches the pattern [a-zA-Z0-9_\-]{2,256}. For good performance, indexes are provided for the first 15 languages set in the Project.

      Parameters:
      slug - value to be set
    • setCategories

      void setCategories(CategoryReference... categories)

      Categories assigned to the Product.

      Parameters:
      categories - values to be set
    • setCategories

      void setCategories(List<CategoryReference> categories)

      Categories assigned to the Product.

      Parameters:
      categories - values to be set
    • setCategoryOrderHints

      void setCategoryOrderHints(CategoryOrderHints categoryOrderHints)

      Order of Product in Categories.

      Parameters:
      categoryOrderHints - value to be set
    • setMetaTitle

      void setMetaTitle(LocalizedString metaTitle)

      Title of the Product displayed in search results.

      Parameters:
      metaTitle - value to be set
    • setMetaDescription

      void setMetaDescription(LocalizedString metaDescription)

      Description of the Product displayed in search results below the meta title.

      Parameters:
      metaDescription - value to be set
    • setMetaKeywords

      void setMetaKeywords(LocalizedString metaKeywords)

      Keywords that give additional information about the Product to search engines.

      Parameters:
      metaKeywords - value to be set
    • setSearchKeywords

      void setSearchKeywords(SearchKeywords searchKeywords)

      Used by Product Suggestions, but is also considered for a full text search.

      Parameters:
      searchKeywords - value to be set
    • setHasStagedChanges

      void setHasStagedChanges(Boolean hasStagedChanges)

      true if the staged data is different from the current data.

      Parameters:
      hasStagedChanges - value to be set
    • setPublished

      void setPublished(Boolean published)

      true if the Product is published.

      Parameters:
      published - value to be set
    • setMasterVariant

      void setMasterVariant(ProductVariant masterVariant)

      The Master Variant of the Product.

      Parameters:
      masterVariant - value to be set
    • setVariants

      void setVariants(ProductVariant... variants)

      Additional Product Variants.

      Parameters:
      variants - values to be set
    • setVariants

      void setVariants(List<ProductVariant> variants)

      Additional Product Variants.

      Parameters:
      variants - values to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryReference taxCategory)

      The TaxCategory of the Product.

      Parameters:
      taxCategory - value to be set
    • setState

      void setState(StateReference state)

      State of the Product.

      Parameters:
      state - value to be set
    • setReviewRatingStatistics

      void setReviewRatingStatistics(ReviewRatingStatistics reviewRatingStatistics)

      Review statistics of the Product.

      Parameters:
      reviewRatingStatistics - value to be set
    • setPriceMode

      void setPriceMode(ProductPriceModeEnum priceMode)

      Indicates whether the Prices of the Product Projection are embedded or standalone. Projecting Prices only works with Embedded, there is currently no support for Standalone.

      Parameters:
      priceMode - value to be set
    • of

      static ProductProjection of()
      factory method
      Returns:
      instance of ProductProjection
    • of

      static ProductProjection of(ProductProjection template)
      factory method to create a shallow copy ProductProjection
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ProductProjection
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ProductProjectionBuilder builder()
      builder factory method for ProductProjection
      Returns:
      builder
    • builder

      static ProductProjectionBuilder builder(ProductProjection template)
      create builder for ProductProjection instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withProductProjection

      default <T> T withProductProjection(Function<ProductProjection,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ProductProjection> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference