org.broadleafcommerce.offer.domain
Class OfferImpl

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

public class OfferImpl
extends java.lang.Object
implements Offer

See Also:
Serialized Form

Field Summary
protected  java.lang.String appliesToCustomerRules
           
protected  java.lang.String appliesToOrderRules
           
protected  boolean applyDiscountToMarkedItems
           
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  int priority
           
static long serialVersionUID
           
protected  boolean stackable
           
protected  java.util.Date startDate
           
protected  java.lang.String targetSystem
           
protected  java.lang.String type
           
protected  int uses
           
protected  java.math.BigDecimal value
           
 
Constructor Summary
OfferImpl()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAppliesToCustomerRules()
           
 java.lang.String getAppliesToOrderRules()
           
 boolean getApplyDiscountToMarkedItems()
           
 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()
           
 int getPriority()
           
 boolean getStackable()
           
 java.util.Date getStartDate()
           
 java.lang.String getTargetSystem()
           
 OfferType getType()
           
 int getUses()
           
 Money getValue()
           
 int hashCode()
           
 boolean isApplyDiscountToMarkedItems()
           
 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.
 void setAppliesToCustomerRules(java.lang.String appliesToCustomerRules)
           
 void setAppliesToOrderRules(java.lang.String appliesToOrderRules)
           
 void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
           
 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 setPriority(int priority)
           
 void setStackable(boolean stackable)
          Sets the stackable value for this offer.
 void setStartDate(java.util.Date startDate)
           
 void setTargetSystem(java.lang.String targetSystem)
           
 void setType(OfferType type)
           
 void setUses(int uses)
           
 void setValue(Money 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

protected java.lang.String appliesToOrderRules

appliesToCustomerRules

protected java.lang.String appliesToCustomerRules

applyDiscountToMarkedItems

protected boolean applyDiscountToMarkedItems

combinableWithOtherOffers

protected boolean combinableWithOtherOffers

deliveryType

protected java.lang.String deliveryType

maxUses

protected int maxUses

uses

protected int uses
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

getValue

public Money getValue()
Specified by:
getValue in interface Offer

setValue

public void setValue(Money 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

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

setAppliesToOrderRules

public void setAppliesToOrderRules(java.lang.String appliesToOrderRules)
Specified by:
setAppliesToOrderRules in interface Offer

getAppliesToCustomerRules

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

setAppliesToCustomerRules

public void setAppliesToCustomerRules(java.lang.String appliesToCustomerRules)
Specified by:
setAppliesToCustomerRules in interface Offer

isApplyDiscountToMarkedItems

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

getApplyDiscountToMarkedItems

public boolean getApplyDiscountToMarkedItems()

setApplyDiscountToMarkedItems

public void setApplyDiscountToMarkedItems(boolean applyDiscountToMarkedItems)
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

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

setUses

public void setUses(int uses)
Specified by:
setUses 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 © 2010. All Rights Reserved.