java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.product.option.JpaProductOption
All Implemented Interfaces:
com.broadleafcommerce.translation.mapping.SubIdentifiable, Serializable

@Embeddable public class JpaProductOption extends Object implements Serializable, com.broadleafcommerce.translation.mapping.SubIdentifiable
JpaProduct.getOptions() stores its options as a serialized list because there is no need to use option fields in JpaProduct query criteria. However, we do find it interesting to be able to query for JpaOptionTemplate by certain fields in its JpaProductOption (potentially for the purposes of RSQL filtration). For this reason, JpaProductOption is not used for JpaOptionTemplate and we map those fields directly from JpaOptionTemplate to ProductOption. This also applies to some of its complex fields like getItemChoice() and getAttributeChoice().
Author:
Samarth Dhruva (samarthd)
See Also:
  • Constructor Details

    • JpaProductOption

      public JpaProductOption()
  • Method Details

    • addFromMeMappings

      public static void addFromMeMappings(@NonNull org.modelmapper.ModelMapper mapper)
    • addToMeMappings

      public static void addToMeMappings(@NonNull org.modelmapper.ModelMapper mapper)
    • getId

      public String getId()
      Specified by:
      getId in interface com.broadleafcommerce.translation.mapping.SubIdentifiable
    • setId

      public void setId(String id)
      Specified by:
      setId in interface com.broadleafcommerce.translation.mapping.SubIdentifiable
    • getSubItemIdentifier

      public String getSubItemIdentifier()
    • getTemplateContextId

      public String getTemplateContextId()
    • getLabel

      public String getLabel()
    • getType

      public String getType()
    • getDisplayOrder

      public Integer getDisplayOrder()
    • getProductContextId

      public String getProductContextId()
    • getSearchOnOption

      public Boolean getSearchOnOption()
    • getItemChoice

      public JpaItemChoice getItemChoice()
    • getAttributeChoice

      public JpaAttributeChoice getAttributeChoice()
    • setSubItemIdentifier

      public void setSubItemIdentifier(String subItemIdentifier)
    • setTemplateContextId

      public void setTemplateContextId(String templateContextId)
    • setLabel

      public void setLabel(String label)
    • setType

      public void setType(String type)
    • setDisplayOrder

      public void setDisplayOrder(Integer displayOrder)
    • setProductContextId

      public void setProductContextId(String productContextId)
    • setSearchOnOption

      public void setSearchOnOption(Boolean searchOnOption)
    • setItemChoice

      public void setItemChoice(JpaItemChoice itemChoice)
    • setAttributeChoice

      public void setAttributeChoice(JpaAttributeChoice attributeChoice)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object