java.lang.Object
com.broadleafcommerce.catalog.provider.jpa.domain.product.JpaVariant
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.CatalogTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking>, com.broadleafcommerce.data.tracking.core.filtering.ActiveAware, com.broadleafcommerce.data.tracking.core.filtering.ActiveFlagAware, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.money.CurrencyProvider, com.broadleafcommerce.data.tracking.core.search.Indexable, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking>, com.broadleafcommerce.translation.domain.Translatable, Serializable, javax.money.CurrencySupplier

@Entity public class JpaVariant extends Object implements com.broadleafcommerce.data.tracking.core.CatalogTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.money.CurrencyProvider, javax.money.CurrencySupplier, com.broadleafcommerce.translation.domain.Translatable, com.broadleafcommerce.data.tracking.core.search.Indexable, com.broadleafcommerce.data.tracking.core.filtering.ActiveAware, com.broadleafcommerce.data.tracking.core.filtering.ActiveFlagAware
JPA-persisted counterpart to a Variant
Author:
Phillip Verheyden (phillipuniverse)
See Also:
  • Constructor Details

    • JpaVariant

      public JpaVariant()
  • Method Details

    • fromMe

      @NonNull public org.modelmapper.ModelMapper fromMe()
      Specified by:
      fromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • toMe

      @NonNull public org.modelmapper.ModelMapper toMe()
      Specified by:
      toMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • preFromMe

      public void preFromMe(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, Object businessDomain)
      Specified by:
      preFromMe in interface com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable
    • getBusinessDomainType

      public Class<?> getBusinessDomainType()
      Specified by:
      getBusinessDomainType in interface com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware
    • getDisplay

      public Optional<String> getDisplay()
      Specified by:
      getDisplay in interface com.broadleafcommerce.data.tracking.core.Trackable
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface com.broadleafcommerce.data.tracking.core.filtering.ActiveFlagAware
    • setDefaultPrice

      public void setDefaultPrice(javax.money.MonetaryAmount defaultPrice)
    • getDefaultPrice

      public javax.money.MonetaryAmount getDefaultPrice()
    • setSalePrice

      public void setSalePrice(javax.money.MonetaryAmount salePrice)
    • getSalePrice

      public javax.money.MonetaryAmount getSalePrice()
    • setCost

      public void setCost(javax.money.MonetaryAmount cost)
    • getCost

      public javax.money.MonetaryAmount getCost()
    • get_id

      public String get_id()
    • getContextId

      public String getContextId()
      Specified by:
      getContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
      Specified by:
      getContextId in interface com.broadleafcommerce.translation.domain.Translatable
    • getTracking

      public com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking getTracking()
      Specified by:
      getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
    • getSku

      public String getSku()
    • getUpc

      public String getUpc()
    • getExternalId

      public String getExternalId()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getActiveStartDate

      public Instant getActiveStartDate()
      Specified by:
      getActiveStartDate in interface com.broadleafcommerce.data.tracking.core.filtering.ActiveAware
    • getActiveEndDate

      public Instant getActiveEndDate()
      Specified by:
      getActiveEndDate in interface com.broadleafcommerce.data.tracking.core.filtering.ActiveAware
    • isOnline

      public boolean isOnline()
    • isDiscountable

      public boolean isDiscountable()
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      Specified by:
      getCurrency in interface javax.money.CurrencySupplier
    • getWidth

      public BigDecimal getWidth()
    • getHeight

      public BigDecimal getHeight()
    • getDepth

      public BigDecimal getDepth()
    • getDimensionUnits

      public String getDimensionUnits()
    • getWeight

      public BigDecimal getWeight()
    • getWeightUnits

      public String getWeightUnits()
    • getInventoryCheckStrategy

      public String getInventoryCheckStrategy()
    • getInventoryReservationStrategy

      public String getInventoryReservationStrategy()
    • getNumberOfReviews

      public Integer getNumberOfReviews()
      See Also:
    • getRating

      public BigDecimal getRating()
      See Also:
    • getRatingUnits

      public String getRatingUnits()
      See Also:
    • getMinimumThreshold

      public Integer getMinimumThreshold()
    • getMaximumThreshold

      public Integer getMaximumThreshold()
    • getAttributes

      public Map<String,JpaAttribute> getAttributes()
    • getProductContextId

      public String getProductContextId()
    • getOptionValues

      public Map<String,String> getOptionValues()
    • getFulfillmentFlatRates

      public Map<String,JpaFulfillmentFlatRate> getFulfillmentFlatRates()
    • getTaxCode

      public String getTaxCode()
    • set_id

      public void set_id(String _id)
    • setContextId

      public void setContextId(String contextId)
      Specified by:
      setContextId in interface com.broadleafcommerce.data.tracking.core.Trackable
    • setTracking

      public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking tracking)
      Specified by:
      setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.CatalogJpaTracking>
    • setSku

      public void setSku(String sku)
    • setUpc

      public void setUpc(String upc)
    • setExternalId

      public void setExternalId(String externalId)
    • setName

      public void setName(String name)
    • setDescription

      public void setDescription(String description)
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
    • setOnline

      public void setOnline(boolean online)
    • setDiscountable

      public void setDiscountable(boolean discountable)
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
    • setWidth

      public void setWidth(BigDecimal width)
    • setHeight

      public void setHeight(BigDecimal height)
    • setDepth

      public void setDepth(BigDecimal depth)
    • setDimensionUnits

      public void setDimensionUnits(String dimensionUnits)
    • setWeight

      public void setWeight(BigDecimal weight)
    • setWeightUnits

      public void setWeightUnits(String weightUnits)
    • setInventoryCheckStrategy

      public void setInventoryCheckStrategy(String inventoryCheckStrategy)
    • setInventoryReservationStrategy

      public void setInventoryReservationStrategy(String inventoryReservationStrategy)
    • setNumberOfReviews

      public void setNumberOfReviews(Integer numberOfReviews)
      See Also:
    • setRating

      public void setRating(BigDecimal rating)
      See Also:
    • setRatingUnits

      public void setRatingUnits(String ratingUnits)
      See Also:
    • setMinimumThreshold

      public void setMinimumThreshold(Integer minimumThreshold)
    • setMaximumThreshold

      public void setMaximumThreshold(Integer maximumThreshold)
    • setAttributes

      public void setAttributes(Map<String,JpaAttribute> attributes)
    • setProductContextId

      public void setProductContextId(String productContextId)
    • setOptionValues

      public void setOptionValues(Map<String,String> optionValues)
    • setFulfillmentFlatRates

      public void setFulfillmentFlatRates(Map<String,JpaFulfillmentFlatRate> fulfillmentFlatRates)
    • setTaxCode

      public void setTaxCode(String taxCode)
    • 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