Class JpaProductOption
java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.product.option.JpaProductOption
- All Implemented Interfaces:
com.broadleafcommerce.translation.mapping.SubIdentifiable
,Serializable
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addFromMeMappings
(org.modelmapper.ModelMapper mapper) static void
addToMeMappings
(org.modelmapper.ModelMapper mapper) protected boolean
boolean
getId()
getLabel()
getType()
int
hashCode()
boolean
void
setAddedByReference
(boolean addedByReference) void
setAttributeChoice
(JpaAttributeChoice attributeChoice) void
setAttributes
(Map<String, Object> attributes) void
setDisplayOrder
(Integer displayOrder) void
void
setItemChoice
(JpaItemChoice itemChoice) void
void
setProductContextId
(String productContextId) void
setSearchOnOption
(Boolean searchOnOption) void
setSubItemIdentifier
(String subItemIdentifier) void
setTemplateContextId
(String templateContextId) void
toString()
-
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
- Specified by:
getId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
-
setId
- Specified by:
setId
in interfacecom.broadleafcommerce.translation.mapping.SubIdentifiable
-
getSubItemIdentifier
-
getTemplateContextId
-
isAddedByReference
public boolean isAddedByReference() -
getLabel
-
getType
-
getDisplayOrder
-
getProductContextId
-
getSearchOnOption
-
getAttributes
-
getItemChoice
-
getAttributeChoice
-
setSubItemIdentifier
-
setTemplateContextId
-
setAddedByReference
public void setAddedByReference(boolean addedByReference) -
setLabel
-
setType
-
setDisplayOrder
-
setProductContextId
-
setSearchOnOption
-
setAttributes
-
setItemChoice
-
setAttributeChoice
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-