org.broadleafcommerce.core.offer.domain
Class OfferImpl

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

@Entity
public class OfferImpl
extends Object
implements Offer

See Also:
Serialized Form

Field Summary
protected  String appliesToCustomerRules
          Deprecated. 
protected  String appliesToOrderRules
          Deprecated. 
protected  boolean applyDiscountToMarkedItems
          Deprecated. 
protected  boolean applyToSalePrice
           
protected  boolean combinableWithOtherOffers
           
protected  String deliveryType
           
protected  String description
           
protected  String discountType
           
protected  Date endDate
           
protected  Long id
           
protected  int maxUses
           
protected  String name
           
protected  String offerItemQualifierRuleType
           
protected  String offerItemTargetRuleType
           
protected  int priority
           
protected  Set<OfferItemCriteria> qualifyingItemCriteria
           
static long serialVersionUID
           
protected  boolean stackable
           
protected  Date startDate
           
protected  OfferItemCriteria targetItemCriteria
           
protected  String targetSystem
           
protected  Boolean totalitarianOffer
           
protected  Boolean treatAsNewFormat
           
protected  String type
           
protected  int uses
          Deprecated. 
protected  BigDecimal value
           
 
Constructor Summary
OfferImpl()
           
 
Method Summary
 boolean equals(Object obj)
           
 String getAppliesToCustomerRules()
          Deprecated. 
 String getAppliesToOrderRules()
          Deprecated. 
 boolean getApplyDiscountToMarkedItems()
          Deprecated. 
 boolean getApplyDiscountToSalePrice()
           
 boolean getCombinableWithOtherOffers()
           
 OfferDeliveryType getDeliveryType()
           
 String getDescription()
           
 OfferDiscountType getDiscountType()
           
 Date getEndDate()
           
 Long getId()
           
 int getMaxUses()
           
 String getName()
           
 OfferItemRestrictionRuleType getOfferItemQualifierRuleType()
           
 OfferItemRestrictionRuleType getOfferItemTargetRuleType()
           
 Map<String,OfferRule> getOfferMatchRules()
           
 int getPriority()
           
 Set<OfferItemCriteria> getQualifyingItemCriteria()
           
 boolean getStackable()
           
 Date getStartDate()
           
 OfferItemCriteria getTargetItemCriteria()
           
 String getTargetSystem()
           
 Boolean getTreatAsNewFormat()
           
 OfferType getType()
           
 int getUses()
          Deprecated. 
 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.
 Boolean isTotalitarianOffer()
           
 void setAppliesToCustomerRules(String appliesToCustomerRules)
          Deprecated. 
 void setAppliesToOrderRules(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(String description)
           
 void setDiscountType(OfferDiscountType discountType)
           
 void setEndDate(Date endDate)
           
 void setId(Long id)
           
 void setMaxUses(int maxUses)
           
 void setName(String name)
           
 void setOfferItemQualifierRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferItemTargetRuleType(OfferItemRestrictionRuleType restrictionRuleType)
           
 void setOfferMatchRules(Map<String,OfferRule> offerMatchRules)
           
 void setPriority(int priority)
           
 void setQualifyingItemCriteria(Set<OfferItemCriteria> qualifyingItemCriteria)
           
 void setStackable(boolean stackable)
          Sets the stackable value for this offer.
 void setStartDate(Date startDate)
           
 void setTargetItemCriteria(OfferItemCriteria targetItemCriteria)
           
 void setTargetSystem(String targetSystem)
           
 void setTotalitarianOffer(Boolean totalitarianOffer)
           
 void setTreatAsNewFormat(Boolean treatAsNewFormat)
           
 void setType(OfferType type)
           
 void setUses(int uses)
          Deprecated. 
 void setValue(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 Long id

name

protected String name

description

protected String description

type

protected String type

discountType

protected String discountType

value

protected BigDecimal value

priority

protected int priority

startDate

protected Date startDate

endDate

protected Date endDate

stackable

protected boolean stackable

targetSystem

protected String targetSystem

applyToSalePrice

protected boolean applyToSalePrice

appliesToOrderRules

@Deprecated
protected String appliesToOrderRules
Deprecated. 

appliesToCustomerRules

@Deprecated
protected String appliesToCustomerRules
Deprecated. 

applyDiscountToMarkedItems

@Deprecated
protected boolean applyDiscountToMarkedItems
Deprecated. 

combinableWithOtherOffers

protected boolean combinableWithOtherOffers

deliveryType

protected String deliveryType

maxUses

protected int maxUses

uses

@Deprecated
protected int uses
Deprecated. 

offerItemQualifierRuleType

protected String offerItemQualifierRuleType

offerItemTargetRuleType

protected String offerItemTargetRuleType

qualifyingItemCriteria

protected Set<OfferItemCriteria> qualifyingItemCriteria

targetItemCriteria

protected OfferItemCriteria targetItemCriteria

totalitarianOffer

protected Boolean totalitarianOffer

treatAsNewFormat

protected Boolean treatAsNewFormat
Constructor Detail

OfferImpl

public OfferImpl()
Method Detail

getId

public Long getId()
Specified by:
getId in interface Offer

setId

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

getName

public String getName()
Specified by:
getName in interface Offer

setName

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

getDescription

public String getDescription()
Specified by:
getDescription in interface Offer

setDescription

public void setDescription(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 BigDecimal getValue()
Specified by:
getValue in interface Offer

setValue

public void setValue(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 Date getStartDate()
Specified by:
getStartDate in interface Offer

setStartDate

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

getEndDate

public Date getEndDate()
Specified by:
getEndDate in interface Offer

setEndDate

public void setEndDate(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 String getTargetSystem()
Specified by:
getTargetSystem in interface Offer

setTargetSystem

public void setTargetSystem(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 String getAppliesToOrderRules()
Deprecated. 

Specified by:
getAppliesToOrderRules in interface Offer

setAppliesToOrderRules

@Deprecated
public void setAppliesToOrderRules(String appliesToOrderRules)
Deprecated. 

Specified by:
setAppliesToOrderRules in interface Offer

getAppliesToCustomerRules

@Deprecated
public String getAppliesToCustomerRules()
Deprecated. 

Specified by:
getAppliesToCustomerRules in interface Offer

setAppliesToCustomerRules

@Deprecated
public void setAppliesToCustomerRules(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 Set<OfferItemCriteria> getQualifyingItemCriteria()
Specified by:
getQualifyingItemCriteria in interface Offer

setQualifyingItemCriteria

public void setQualifyingItemCriteria(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 Boolean isTotalitarianOffer()
Specified by:
isTotalitarianOffer in interface Offer

setTotalitarianOffer

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

getOfferMatchRules

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

setOfferMatchRules

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

getTreatAsNewFormat

public Boolean getTreatAsNewFormat()
Specified by:
getTreatAsNewFormat in interface Offer

setTreatAsNewFormat

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.