java.lang.Object
com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaMarketingMessage
All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware, com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, com.broadleafcommerce.data.tracking.core.filtering.ActiveAware, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.Trackable, com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, ActiveDateEntity, com.broadleafcommerce.translation.domain.Translatable, Serializable

@Entity public class JpaMarketingMessage extends Object implements com.broadleafcommerce.data.tracking.core.ApplicationTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>, com.broadleafcommerce.data.tracking.core.mapping.ModelMapperMappable, com.broadleafcommerce.data.tracking.core.mapping.BusinessTypeAware, Serializable, com.broadleafcommerce.translation.domain.Translatable, com.broadleafcommerce.data.tracking.core.filtering.ActiveAware, ActiveDateEntity
Persistent counter-part to a MarketingMessage for use with a Jpa datastore.
Author:
Nathan Moore (nathanmoore).
See Also:
  • Constructor Details

    • JpaMarketingMessage

      public JpaMarketingMessage()
  • Method Details

    • 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
    • getCurrencyFromLocale

      protected javax.money.CurrencyUnit getCurrencyFromLocale(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • 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
    • getMinCartSubtotal

      public javax.money.MonetaryAmount getMinCartSubtotal()
    • setMinCartSubtotal

      public void setMinCartSubtotal(javax.money.MonetaryAmount minCartSubtotal)
    • getMaxCartSubtotal

      public javax.money.MonetaryAmount getMaxCartSubtotal()
    • setMaxCartSubtotal

      public void setMaxCartSubtotal(javax.money.MonetaryAmount maxCartSubtotal)
    • 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
    • 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
    • getOfferContextId

      public String getOfferContextId()
    • getText

      public String getText()
    • getPriority

      public Integer getPriority()
    • getTargetType

      public String getTargetType()
    • getLocationType

      @Deprecated public String getLocationType()
      Deprecated.
    • getLocationTypes

      public List<String> getLocationTypes()
    • getLocale

      @Deprecated public Locale getLocale()
      Deprecated.
    • getActiveStartDate

      public Instant getActiveStartDate()
      Description copied from interface: ActiveDateEntity
      The time at which this entity becomes active for storefront consumption. Can be null, in which case the item is always active.
      Specified by:
      getActiveStartDate in interface com.broadleafcommerce.data.tracking.core.filtering.ActiveAware
      Specified by:
      getActiveStartDate in interface ActiveDateEntity
      Returns:
      The time at which this entity becomes active for storefront consumption
    • getActiveEndDate

      public Instant getActiveEndDate()
      Description copied from interface: ActiveDateEntity
      The time at which this entity becomes inactive for storefront consumption. Can be null, in which case the item does not expire.
      Specified by:
      getActiveEndDate in interface com.broadleafcommerce.data.tracking.core.filtering.ActiveAware
      Specified by:
      getActiveEndDate in interface ActiveDateEntity
      Returns:
      The time at which this entity becomes inactive for storefront consumption
    • getDisplayHint

      public String getDisplayHint()
    • getShowIfOfferApplied

      public Boolean getShowIfOfferApplied()
    • getUseCartSubtotal

      public Boolean getUseCartSubtotal()
    • getCurrency

      public javax.money.CurrencyUnit getCurrency()
      Transient property that holds the currency used to convert price to a MonetaryAmount.
    • getTracking

      public com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking getTracking()
      Specified by:
      getTracking in interface com.broadleafcommerce.data.tracking.core.Trackable
    • 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
    • setOfferContextId

      public void setOfferContextId(String offerContextId)
    • setText

      public void setText(String text)
    • setPriority

      public void setPriority(Integer priority)
    • setTargetType

      public void setTargetType(String targetType)
    • setLocationType

      @Deprecated public void setLocationType(String locationType)
      Deprecated.
    • setLocationTypes

      public void setLocationTypes(List<String> locationTypes)
    • setLocale

      @Deprecated public void setLocale(Locale locale)
      Deprecated.
    • setActiveStartDate

      public void setActiveStartDate(Instant activeStartDate)
    • setActiveEndDate

      public void setActiveEndDate(Instant activeEndDate)
    • setDisplayHint

      public void setDisplayHint(String displayHint)
    • setShowIfOfferApplied

      public void setShowIfOfferApplied(Boolean showIfOfferApplied)
    • setUseCartSubtotal

      public void setUseCartSubtotal(Boolean useCartSubtotal)
    • setCurrency

      public void setCurrency(javax.money.CurrencyUnit currency)
      Transient property that holds the currency used to convert price to a MonetaryAmount.
    • setTracking

      public void setTracking(com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking)
      Specified by:
      setTracking in interface com.broadleafcommerce.data.tracking.core.TypedTrackable<com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking>
    • 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