org.broadleafcommerce.core.offer.domain
Class OfferImpl

java.lang.Object
  extended by org.broadleafcommerce.core.offer.domain.OfferImpl
All Implemented Interfaces:
java.io.Serializable, Offer

@Entity
public class OfferImpl
extends java.lang.Object
implements Offer

See Also:
Serialized Form

Field Summary
protected  java.lang.String appliesToCustomerRules
          Deprecated. 
protected  java.lang.String appliesToOrderRules
          Deprecated. 
protected  boolean applyDiscountToMarkedItems
          Deprecated. 
protected  boolean applyToSalePrice
           
protected  boolean combinableWithOtherOffers
           
protected  java.lang.String deliveryType
           
protected  java.lang.String description
           
protected  java.lang.String discountType
           
protected  java.util.Date endDate
           
protected  java.lang.Long id
           
protected  int maxUses
           
protected  java.lang.String name
           
protected  java.lang.String offerItemQualifierRuleType
           
protected  java.lang.String offerItemTargetRuleType
           
protected  int priority
           
protected  java.util.Set<OfferItemCriteria> qualifyingItemCriteria
           
static long serialVersionUID
           
protected  boolean stackable
           
protected  java.util.Date startDate
           
protected  OfferItemCriteria targetItemCriteria
           
protected  java.lang.String targetSystem
           
protected  java.lang.Boolean totalitarianOffer
           
protected  java.lang.Boolean treatAsNewFormat
           
protected  java.lang.String type
           
protected  int uses
          Deprecated. 
protected  java.math.BigDecimal value
           
 
Constructor Summary
OfferImpl()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAppliesToCustomerRules()
          Deprecated. 
 java.lang.String getAppliesToOrderRules()
          Deprecated. 
 boolean getApplyDiscountToMarkedItems()
          Deprecated. 
 boolean getApplyDiscountToSalePrice()
           
 boolean getCombinableWithOtherOffers()
           
 OfferDeliveryType getDeliveryType()
           
 java.lang.String getDescription()
           
 OfferDiscountType getDiscountType()
           
 java.util.Date getEndDate()
           
 java.lang.Long getId()
           
 int getMaxUses()
           
 java.lang.String getName()
           
 OfferItemRestrictionRuleType getOfferItemQualifierRuleType()
           
 OfferItemRestrictionRuleType getOfferItemTargetRuleType()
           
 java.util.Map<java.lang.String,OfferRule> getOfferMatchRules()
           
 int getPriority()
           
 java.util.Set<OfferItemCriteria> getQualifyingItemCriteria()
           
 boolean getStackable()
           
 java.util.Date getStartDate()
           
 OfferItemCriteria getTargetItemCriteria()
           
 java.lang.String getTargetSystem()
           
 java.lang.Boolean getTreatAsNewFormat()
           
 OfferType getType()
           
 int getUses()
          Deprecated. 
 java.math.BigDecimal getValue()
           
 int hashCode()
           
 boolean isApplyDiscountToMarkedItems()
          Deprecated. 
 boolean isCombinableWithOtherOffers()
          Returns true if this offer can be combined with other offers in the order.
 boolean isStackable()
          Returns true if this offer can be stacked on top of another offer.
 java.lang.Boolean isTotalitarianOffer()
           
 void setAppliesToCustomerRules(java.lang.String appliesToCustomerRules)
          Deprecated. 
 void setAppliesToOrderRules(java.lang.String appliesToOrderRules)
          Deprecated. 
 void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
          Deprecated. 
 void setApplyDiscountToSalePrice(boolean applyToSalePrice)
           
 void setCombinableWithOtherOffers(boolean combinableWithOtherOffers)
          Sets the combinableWithOtherOffers value for this offer.
 void setDeliveryType(OfferDeliveryType deliveryType)
           
 void setDescription(java.lang.String description)
           
 void setDiscountType(OfferDiscountType discountType)
           
 void setEndDate(java.util.Date endDate)
           
 void setId(java.lang.Long id)
           
 void setMaxUses(int maxUses)
           
 void setName(java.lang.String name)
           
 void setOfferItemQualifierRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferItemTargetRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferMatchRules(java.util.Map<java.lang.String,OfferRule> offerMatchRules)
           
 void setPriority(int priority)
           
 void setQualifyingItemCriteria(java.util.Set<OfferItemCriteria> qualifyingItemCriteria)
           
 void setStackable(boolean stackable)
          Sets the stackable value for this offer.
 void setStartDate(java.util.Date startDate)
           
 void setTargetItemCriteria(OfferItemCriteria targetItemCriteria)
           
 void setTargetSystem(java.lang.String targetSystem)
           
 void setTotalitarianOffer(java.lang.Boolean totalitarianOffer)
           
 void setTreatAsNewFormat(java.lang.Boolean treatAsNewFormat)
           
 void setType(OfferType type)
           
 void setUses(int uses)
          Deprecated. 
 void setValue(java.math.BigDecimal value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values

id

protected java.lang.Long id

name

protected java.lang.String name

description

protected java.lang.String description

type

protected java.lang.String type

discountType

protected java.lang.String discountType

value

protected java.math.BigDecimal value

priority

protected int priority

startDate

protected java.util.Date startDate

endDate

protected java.util.Date endDate

stackable

protected boolean stackable

targetSystem

protected java.lang.String targetSystem

applyToSalePrice

protected boolean applyToSalePrice

appliesToOrderRules

@Deprecated
protected java.lang.String appliesToOrderRules
Deprecated. 

appliesToCustomerRules

@Deprecated
protected java.lang.String appliesToCustomerRules
Deprecated. 

applyDiscountToMarkedItems

@Deprecated
protected boolean applyDiscountToMarkedItems
Deprecated. 

combinableWithOtherOffers

protected boolean combinableWithOtherOffers

deliveryType

protected java.lang.String deliveryType

maxUses

protected int maxUses

uses

@Deprecated
protected int uses
Deprecated. 

offerItemQualifierRuleType

protected java.lang.String offerItemQualifierRuleType

offerItemTargetRuleType

protected java.lang.String offerItemTargetRuleType

qualifyingItemCriteria

protected java.util.Set<OfferItemCriteria> qualifyingItemCriteria

targetItemCriteria

protected OfferItemCriteria targetItemCriteria

totalitarianOffer

protected java.lang.Boolean totalitarianOffer

treatAsNewFormat

protected java.lang.Boolean treatAsNewFormat
Constructor Detail

OfferImpl

public OfferImpl()
Method Detail

getId

public java.lang.Long getId()
Specified by:
getId in interface Offer

setId

public void setId(java.lang.Long id)
Specified by:
setId in interface Offer

getName

public java.lang.String getName()
Specified by:
getName in interface Offer

setName

public void setName(java.lang.String name)
Specified by:
setName in interface Offer

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Offer

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface Offer

getType

public OfferType getType()
Specified by:
getType in interface Offer

setType

public void setType(OfferType type)
Specified by:
setType in interface Offer

getDiscountType

public OfferDiscountType getDiscountType()
Specified by:
getDiscountType in interface Offer

setDiscountType

public void setDiscountType(OfferDiscountType discountType)
Specified by:
setDiscountType in interface Offer

getOfferItemQualifierRuleType

public OfferItemRestrictionRuleType getOfferItemQualifierRuleType()
Specified by:
getOfferItemQualifierRuleType in interface Offer

setOfferItemQualifierRuleType

public void setOfferItemQualifierRuleType(OfferItemRestrictionRuleType restrictionRuleType)
Specified by:
setOfferItemQualifierRuleType in interface Offer

getOfferItemTargetRuleType

public OfferItemRestrictionRuleType getOfferItemTargetRuleType()
Specified by:
getOfferItemTargetRuleType in interface Offer

setOfferItemTargetRuleType

public void setOfferItemTargetRuleType(OfferItemRestrictionRuleType restrictionRuleType)
Specified by:
setOfferItemTargetRuleType in interface Offer

getValue

public java.math.BigDecimal getValue()
Specified by:
getValue in interface Offer

setValue

public void setValue(java.math.BigDecimal value)
Specified by:
setValue in interface Offer

getPriority

public int getPriority()
Specified by:
getPriority in interface Offer

setPriority

public void setPriority(int priority)
Specified by:
setPriority in interface Offer

getStartDate

public java.util.Date getStartDate()
Specified by:
getStartDate in interface Offer

setStartDate

public void setStartDate(java.util.Date startDate)
Specified by:
setStartDate in interface Offer

getEndDate

public java.util.Date getEndDate()
Specified by:
getEndDate in interface Offer

setEndDate

public void setEndDate(java.util.Date endDate)
Specified by:
setEndDate in interface Offer

isStackable

public boolean isStackable()
Returns true if this offer can be stacked on top of another offer. Stackable is evaluated against offers with the same offer type.

Specified by:
isStackable in interface Offer
Returns:
true if stackable, otherwise false

setStackable

public void setStackable(boolean stackable)
Sets the stackable value for this offer.

Specified by:
setStackable in interface Offer
Parameters:
stackable -

getStackable

public boolean getStackable()

getTargetSystem

public java.lang.String getTargetSystem()
Specified by:
getTargetSystem in interface Offer

setTargetSystem

public void setTargetSystem(java.lang.String targetSystem)
Specified by:
setTargetSystem in interface Offer

getApplyDiscountToSalePrice

public boolean getApplyDiscountToSalePrice()
Specified by:
getApplyDiscountToSalePrice in interface Offer

setApplyDiscountToSalePrice

public void setApplyDiscountToSalePrice(boolean applyToSalePrice)
Specified by:
setApplyDiscountToSalePrice in interface Offer

getAppliesToOrderRules

@Deprecated
public java.lang.String getAppliesToOrderRules()
Deprecated. 

Specified by:
getAppliesToOrderRules in interface Offer

setAppliesToOrderRules

@Deprecated
public void setAppliesToOrderRules(java.lang.String appliesToOrderRules)
Deprecated. 

Specified by:
setAppliesToOrderRules in interface Offer

getAppliesToCustomerRules

@Deprecated
public java.lang.String getAppliesToCustomerRules()
Deprecated. 

Specified by:
getAppliesToCustomerRules in interface Offer

setAppliesToCustomerRules

@Deprecated
public void setAppliesToCustomerRules(java.lang.String appliesToCustomerRules)
Deprecated. 

Specified by:
setAppliesToCustomerRules in interface Offer

isApplyDiscountToMarkedItems

@Deprecated
public boolean isApplyDiscountToMarkedItems()
Deprecated. 

Specified by:
isApplyDiscountToMarkedItems in interface Offer

getApplyDiscountToMarkedItems

@Deprecated
public boolean getApplyDiscountToMarkedItems()
Deprecated. 


setApplyDiscountToMarkedItems

@Deprecated
public void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
Deprecated. 

Specified by:
setApplyDiscountToMarkedItems in interface Offer

isCombinableWithOtherOffers

public boolean isCombinableWithOtherOffers()
Returns true if this offer can be combined with other offers in the order.

Specified by:
isCombinableWithOtherOffers in interface Offer
Returns:
true if combinableWithOtherOffers, otherwise false

setCombinableWithOtherOffers

public void setCombinableWithOtherOffers(boolean combinableWithOtherOffers)
Sets the combinableWithOtherOffers value for this offer.

Specified by:
setCombinableWithOtherOffers in interface Offer
Parameters:
combinableWithOtherOffers -

getCombinableWithOtherOffers

public boolean getCombinableWithOtherOffers()

getDeliveryType

public OfferDeliveryType getDeliveryType()
Specified by:
getDeliveryType in interface Offer

setDeliveryType

public void setDeliveryType(OfferDeliveryType deliveryType)
Specified by:
setDeliveryType in interface Offer

getMaxUses

public int getMaxUses()
Specified by:
getMaxUses in interface Offer

setMaxUses

public void setMaxUses(int maxUses)
Specified by:
setMaxUses in interface Offer

getUses

@Deprecated
public int getUses()
Deprecated. 

Specified by:
getUses in interface Offer

setUses

@Deprecated
public void setUses(int uses)
Deprecated. 

Specified by:
setUses in interface Offer

getQualifyingItemCriteria

public java.util.Set<OfferItemCriteria> getQualifyingItemCriteria()
Specified by:
getQualifyingItemCriteria in interface Offer

setQualifyingItemCriteria

public void setQualifyingItemCriteria(java.util.Set<OfferItemCriteria> qualifyingItemCriteria)
Specified by:
setQualifyingItemCriteria in interface Offer

getTargetItemCriteria

public OfferItemCriteria getTargetItemCriteria()
Specified by:
getTargetItemCriteria in interface Offer

setTargetItemCriteria

public void setTargetItemCriteria(OfferItemCriteria targetItemCriteria)
Specified by:
setTargetItemCriteria in interface Offer

isTotalitarianOffer

public java.lang.Boolean isTotalitarianOffer()
Specified by:
isTotalitarianOffer in interface Offer

setTotalitarianOffer

public void setTotalitarianOffer(java.lang.Boolean totalitarianOffer)
Specified by:
setTotalitarianOffer in interface Offer

getOfferMatchRules

public java.util.Map<java.lang.String,OfferRule> getOfferMatchRules()
Specified by:
getOfferMatchRules in interface Offer

setOfferMatchRules

public void setOfferMatchRules(java.util.Map<java.lang.String,OfferRule> offerMatchRules)
Specified by:
setOfferMatchRules in interface Offer

getTreatAsNewFormat

public java.lang.Boolean getTreatAsNewFormat()
Specified by:
getTreatAsNewFormat in interface Offer

setTreatAsNewFormat

public void setTreatAsNewFormat(java.lang.Boolean treatAsNewFormat)
Specified by:
setTreatAsNewFormat in interface Offer

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2012. All Rights Reserved.