Class ProductSelectionAssignmentImpl

java.lang.Object
com.commercetools.api.models.product_selection.ProductSelectionAssignmentImpl
All Implemented Interfaces:
ProductSelectionAssignment, io.vrap.rmf.base.client.ModelBase

public class ProductSelectionAssignmentImpl extends Object implements ProductSelectionAssignment, io.vrap.rmf.base.client.ModelBase

Given the mode of Product Selection, this assignment refers to, it may contain:

  • variantSelection field for a Product Selection with Individual ProductSelectionMode.
  • variantExclusion field for a Product Selection with IndividualExclusion ProductSelectionMode.
  • Constructor Details

    • ProductSelectionAssignmentImpl

      public ProductSelectionAssignmentImpl()
      create empty instance
  • Method Details

    • getProduct

      public ProductReference getProduct()

      Reference to a Product that is assigned to the ProductSelection.

      Specified by:
      getProduct in interface ProductSelectionAssignment
      Returns:
      product
    • getProductSelection

      public ProductSelectionReference getProductSelection()

      Reference to the Product Selection that this assignment is part of.

      Specified by:
      getProductSelection in interface ProductSelectionAssignment
      Returns:
      productSelection
    • getVariantSelection

      public ProductVariantSelection getVariantSelection()

      Define which Variants of the added Product will be included in the Product Selection.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Specified by:
      getVariantSelection in interface ProductSelectionAssignment
      Returns:
      variantSelection
    • getVariantExclusion

      public ProductVariantExclusion getVariantExclusion()

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Specified by:
      getVariantExclusion in interface ProductSelectionAssignment
      Returns:
      variantExclusion
    • setProduct

      public void setProduct(ProductReference product)
      Description copied from interface: ProductSelectionAssignment

      Reference to a Product that is assigned to the ProductSelection.

      Specified by:
      setProduct in interface ProductSelectionAssignment
      Parameters:
      product - value to be set
    • setProductSelection

      public void setProductSelection(ProductSelectionReference productSelection)
      Description copied from interface: ProductSelectionAssignment

      Reference to the Product Selection that this assignment is part of.

      Specified by:
      setProductSelection in interface ProductSelectionAssignment
      Parameters:
      productSelection - value to be set
    • setVariantSelection

      public void setVariantSelection(ProductVariantSelection variantSelection)
      Description copied from interface: ProductSelectionAssignment

      Define which Variants of the added Product will be included in the Product Selection.

      This field is only available for assignments to a Product Selection with Individual ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Specified by:
      setVariantSelection in interface ProductSelectionAssignment
      Parameters:
      variantSelection - value to be set
    • setVariantExclusion

      public void setVariantExclusion(ProductVariantExclusion variantExclusion)
      Description copied from interface: ProductSelectionAssignment

      Defines which Variants of the Product will be excluded from the Product Selection.

      This field is only available for assignments to a Product Selection with IndividualExclusion ProductSelectionMode. The list of SKUs will be updated automatically on any change of those performed on the respective Product itself.

      Specified by:
      setVariantExclusion in interface ProductSelectionAssignment
      Parameters:
      variantExclusion - 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