|
||||||||||
| 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.promo.PeanutCode
public class PeanutCode
Peanut Codes are hang-tags associated with various products, printed with unique serial numbers.
| Field Summary | |
|---|---|
private Timestamp |
issued
|
private BigDecimal |
maxPeanuts
|
private BigDecimal |
minPeanuts
|
private String |
peanutCode
|
private int |
redeemedByID
|
private Timestamp |
redeemedOn
|
private int |
serialID
|
private static long |
serialVersionUID
Java serialisation unique ID |
| Constructor Summary | |
|---|---|
PeanutCode(ResultSet rs)
twheys@gmail.com Jan 7, 2010 |
|
PeanutCode(String pnutCodeSerial)
twheys@gmail.com Jan 7, 2010 |
|
PeanutCode(String pnutCodeSerial,
int minValue,
int maxValue)
twheys@gmail.com Jan 7, 2010 |
|
| Method Summary | |
|---|---|
void |
flush()
|
static PeanutCode |
getByPeanutCode(String serialNumber)
twheys@gmail.com Jan 7, 2010 |
protected String |
getCacheUniqueID()
|
int |
getID()
|
Timestamp |
getIssued()
|
BigDecimal |
getMaxPeanuts()
|
BigDecimal |
getMinPeanuts()
|
String |
getPeanutCode()
|
int |
getRedeemedByID()
|
Timestamp |
getRedeemedOn()
|
private BigDecimal |
getRedeemValue()
twheys@gmail.com Jan 7, 2010 |
private void |
insert()
WRITEME |
boolean |
isRedeemed()
twheys@gmail.com Jan 7, 2010 |
private void |
redeem(int redeemerID)
twheys@gmail.com Jan 7, 2010 |
static BigInteger |
redeemPeanutCode(GeneralUser redeemer,
String peanutCode)
twheys@gmail.com Jan 7, 2010 |
protected void |
set(ResultSet rs)
|
void |
setMaxPeanuts(BigDecimal newMaxPeanuts)
|
void |
setMinPeanuts(BigDecimal newMinPeanuts)
|
| 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, toString, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private Timestamp issued
private BigDecimal maxPeanuts
private BigDecimal minPeanuts
private String peanutCode
private int redeemedByID
private Timestamp redeemedOn
private int serialID
| Constructor Detail |
|---|
public PeanutCode(ResultSet rs)
twheys@gmail.com Jan 7, 2010A PeanutCode WRITEME...
rs - WRITEMEpublic PeanutCode(String pnutCodeSerial)
twheys@gmail.com Jan 7, 2010A PeanutCode WRITEME...
pnutCodeSerial - WRITEME
public PeanutCode(String pnutCodeSerial,
int minValue,
int maxValue)
twheys@gmail.com Jan 7, 2010A PeanutCode WRITEME...
pnutCodeSerial - WRITEMEminValue - WRITEMEmaxValue - WRITEME| Method Detail |
|---|
public static PeanutCode getByPeanutCode(String serialNumber)
throws NotFoundException
twheys@gmail.com Jan 7, 2010TO getByPeanutCode WRITEME...
serialNumber - WRITEME
NotFoundException - WRITEME
public static BigInteger redeemPeanutCode(GeneralUser redeemer,
String peanutCode)
throws NotFoundException,
AlreadyUsedException
twheys@gmail.com Jan 7, 2010TO redeemPeanutCode WRITEME...
redeemer - WRITEMEpeanutCode - WRITEME
NotFoundException - WRITEME
AlreadyUsedException - WRITEMEpublic void flush()
flush in class SQLPeerDatumSQLPeerDatum.flush()protected String getCacheUniqueID()
getCacheUniqueID in class SQLPeerDatumSQLPeerDatum.getCacheUniqueID()public int getID()
public Timestamp getIssued()
public BigDecimal getMaxPeanuts()
public BigDecimal getMinPeanuts()
public String getPeanutCode()
public int getRedeemedByID()
public Timestamp getRedeemedOn()
private BigDecimal getRedeemValue()
twheys@gmail.com Jan 7, 2010TO getRedeemValue WRITEME...
private void insert()
public boolean isRedeemed()
twheys@gmail.com Jan 7, 2010TO isRedeemed WRITEME...
private void redeem(int redeemerID)
twheys@gmail.com Jan 7, 2010TO redeem WRITEME...
redeemerID - WRITEME
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 setMaxPeanuts(BigDecimal newMaxPeanuts)
newMaxPeanuts - the maxPeanuts to setpublic void setMinPeanuts(BigDecimal newMinPeanuts)
newMinPeanuts - the minPeanuts to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||