|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.sql.SQLPeerDatum
com.tootsville.Coupon
public class Coupon
TODO: The documentation for this type (Coupon) is incomplete. (twheys@gmail.com, Nov 3, 2009) XXX: I have no idea what this used to do and I'm removing it for now. XXX: Find out what this does and fix it.
| Field Summary | |
|---|---|
private BigDecimal |
couponAmount
WRITEME: document this field (twheys@gmail.com, Nov 3, 2009) couponAmount (Coupon) |
private String |
couponCode
WRITEME: document this field (twheys@gmail.com, Nov 3, 2009) couponCode (Coupon) |
private String |
couponDescription
WRITEME FIXME: getText |
private int |
couponID
The coupon's unique ID value |
private BigDecimal |
couponMinAmount
The minimum amount for the coupon to WTF? WRITEME |
private String |
couponName
The label for this coupon |
private Date |
endDate
The expiry date of this coupon. |
private static long |
serialVersionUID
WRITEME: document this field (twheys@gmail.com, Oct 28, 2009) serialVersionUID (long) |
private Date |
startDate
The date at which this coupon becomes effective |
private int |
usesPerCoupon
The number of times for which this coupon may be used |
private int |
usesPerUser
The number of times for which one user may use this coupon |
| Constructor Summary | |
|---|---|
Coupon(String userName)
|
|
| Method Summary | |
|---|---|
void |
flush()
This is an overriding method. |
private static String |
generateRandomCode()
WRITEME: document this method (twheys@gmail.com, Sep 29, 2009) |
protected String |
getCacheUniqueID()
This is an overriding method. |
BigDecimal |
getCouponAmount()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
String |
getCouponCode()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
String |
getCouponDescription()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
int |
getCouponID()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
BigDecimal |
getCouponMinAmount()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
String |
getCouponName()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
Date |
getEndDate()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
Date |
getStartDate()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
int |
getUsesPerCoupon()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
int |
getUsesPerUser()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
private void |
insertCoupon()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
private void |
insertCouponDescription()
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
sendCouponCode(AbstractPerson user)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
protected void |
set(ResultSet rs)
This is an overriding method. |
void |
setCouponAmount(BigDecimal newCouponAmount)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setCouponCode(String newCouponCode)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setCouponID(int newCouponID)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setCouponMinAmount(BigDecimal newCouponMinAmount)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setCouponName(String newCouponName)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setEndDate(Date newEndDate)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setStartDate(Date newStartDate)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setUsesPerCoupon(int newUsesPerCoupon)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
void |
setUsesPerUser(int newUsesPerUser)
WRITEME: document this method (twheys@gmail.com, Nov 3, 2009) |
String |
toString()
This is an overriding method. |
| Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
|---|
changed, compareTo, findInCache, saveInCache, set, toJSON |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private BigDecimal couponAmount
private String couponCode
private String couponDescription
private int couponID
private BigDecimal couponMinAmount
private String couponName
private Date endDate
private Date startDate
private int usesPerCoupon
private int usesPerUser
| Constructor Detail |
|---|
public Coupon(String userName)
userName - The debug name (user name plus user ID number) of
the user for whom the coupon is being created| Method Detail |
|---|
private static String generateRandomCode()
public void flush()
flush in class SQLPeerDatumSQLPeerDatum.flush()protected String getCacheUniqueID()
getCacheUniqueID in class SQLPeerDatumSQLPeerDatum.getCacheUniqueID()public BigDecimal getCouponAmount()
public String getCouponCode()
public String getCouponDescription()
public int getCouponID()
public BigDecimal getCouponMinAmount()
public String getCouponName()
public Date getEndDate()
public Date getStartDate()
public int getUsesPerCoupon()
public int getUsesPerUser()
private void insertCoupon()
private void insertCouponDescription()
public void sendCouponCode(AbstractPerson user)
user - TODO
protected void set(ResultSet rs)
throws SQLException
set in class SQLPeerDatumrs - The result of an SQL query, with the cursor already
pointed at the row describing this specific instance
of the object.
SQLException - if the database fails somehowSQLPeerDatum.set(java.sql.ResultSet)public void setCouponAmount(BigDecimal newCouponAmount)
newCouponAmount - TODOpublic void setCouponCode(String newCouponCode)
newCouponCode - TODOpublic void setCouponID(int newCouponID)
newCouponID - TODOpublic void setCouponMinAmount(BigDecimal newCouponMinAmount)
newCouponMinAmount - TODOpublic void setCouponName(String newCouponName)
newCouponName - TODOpublic void setEndDate(Date newEndDate)
newEndDate - TODOpublic void setStartDate(Date newStartDate)
newStartDate - TODOpublic void setUsesPerCoupon(int newUsesPerCoupon)
newUsesPerCoupon - TODOpublic void setUsesPerUser(int newUsesPerUser)
newUsesPerUser - TODOpublic String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||