org.broadleafcommerce.core.offer.domain
Class OfferCodeImpl

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

@Entity
public class OfferCodeImpl
extends Object
implements OfferCode

See Also:
Serialized Form

Field Summary
protected  Long id
           
protected  Integer maxUses
           
protected  Offer offer
           
protected  String offerCode
           
protected  Date offerCodeEndDate
           
protected  Date offerCodeStartDate
           
protected  List<Order> orders
           
static long serialVersionUID
           
protected  int uses
          Deprecated. 
 
Constructor Summary
OfferCodeImpl()
           
 
Method Summary
 boolean equals(Object o)
           
 Date getEndDate()
           
 Long getId()
           
 int getMaxUses()
          Returns the maximum number of times that this code can be used regardless of Order or Customer 0 indicates unlimited usage.
 Offer getOffer()
           
 String getOfferCode()
           
 List<Order> getOrders()
           
 Date getStartDate()
           
 int getUses()
          Deprecated. 
 int hashCode()
           
 boolean isLimitedUse()
          Indicates that this code has a limit on how many times it can be used.
 boolean isUnlimitedUse()
          Indicates that this is an unlimited-use code.
 void setEndDate(Date endDate)
           
 void setId(Long id)
           
 void setMaxUses(int maxUses)
          Sets the maximum number of times that this code can be used regardless of Order or Customer 0 indicates unlimited usage.
 void setOffer(Offer offer)
           
 void setOfferCode(String offerCode)
           
 void setOrders(List<Order> orders)
           
 void setStartDate(Date startDate)
           
 void setUses(int uses)
          Deprecated. 
 
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

offer

protected Offer offer

offerCode

protected String offerCode

offerCodeStartDate

protected Date offerCodeStartDate

offerCodeEndDate

protected Date offerCodeEndDate

maxUses

protected Integer maxUses

uses

@Deprecated
protected int uses
Deprecated. 

orders

protected List<Order> orders
Constructor Detail

OfferCodeImpl

public OfferCodeImpl()
Method Detail

getId

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

setId

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

getOffer

public Offer getOffer()
Specified by:
getOffer in interface OfferCode

setOffer

public void setOffer(Offer offer)
Specified by:
setOffer in interface OfferCode

getOfferCode

public String getOfferCode()
Specified by:
getOfferCode in interface OfferCode

setOfferCode

public void setOfferCode(String offerCode)
Specified by:
setOfferCode in interface OfferCode

getMaxUses

public int getMaxUses()
Description copied from interface: OfferCode
Returns the maximum number of times that this code can be used regardless of Order or Customer 0 indicates unlimited usage.

Specified by:
getMaxUses in interface OfferCode
Returns:

setMaxUses

public void setMaxUses(int maxUses)
Description copied from interface: OfferCode
Sets the maximum number of times that this code can be used regardless of Order or Customer 0 indicates unlimited usage.

Specified by:
setMaxUses in interface OfferCode

isUnlimitedUse

public boolean isUnlimitedUse()
Description copied from interface: OfferCode
Indicates that this is an unlimited-use code. By default this is true if OfferCode.getMaxUses() == 0

Specified by:
isUnlimitedUse in interface OfferCode

isLimitedUse

public boolean isLimitedUse()
Description copied from interface: OfferCode
Indicates that this code has a limit on how many times it can be used. By default this is true if OfferCode.getMaxUses() > 0

Specified by:
isLimitedUse in interface OfferCode

getUses

@Deprecated
public int getUses()
Deprecated. 

Specified by:
getUses in interface OfferCode

setUses

@Deprecated
public void setUses(int uses)
Deprecated. 

Specified by:
setUses in interface OfferCode

getStartDate

public Date getStartDate()
Specified by:
getStartDate in interface OfferCode

setStartDate

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

getEndDate

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

setEndDate

public void setEndDate(Date endDate)
Specified by:
setEndDate in interface OfferCode

getOrders

public List<Order> getOrders()
Specified by:
getOrders in interface OfferCode

setOrders

public void setOrders(List<Order> orders)
Specified by:
setOrders in interface OfferCode

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


Copyright © 2013. All Rights Reserved.