|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.starhope.appius.sql.SQLPeerDatum
org.starhope.appius.mb.Enrolment
public class Enrolment
An Enrolment object represents a potential type of enrolment or subscription into which an User can be subscribed. This does not represent an actual commitment by the user to a particular subscription, only that one is potentially possible.
UserEnrolment for actual
subscriptions/registrations
,
Serialized FormField Summary | |
---|---|
private boolean |
autoRenew
WRITEME |
private boolean |
available
WRITEME |
private int |
id
WRITEME |
private BigDecimal |
price
WRITEME |
private String |
productCode
WRITEME |
private long |
renewDays
WRITEME |
private int |
renewMonths
WRITEME |
private static long |
serialVersionUID
TODO: document this field (theys, Oct 5, 2009) serialVersionUID (long) |
private String |
title
WRITEME |
Constructor Summary | |
---|---|
|
Enrolment(BigDecimal d)
|
protected |
Enrolment(ResultSet resultSet)
WRITEME |
Method Summary | |
---|---|
void |
flush()
This is an overriding method. |
static Enrolment[] |
getAvailableEnrolments()
Returns all products in the products table that are flagged as Available AND Visible |
static Enrolment |
getByID(int id)
TODO: document this method (brpocock, Sep 23, 2009) |
static Enrolment |
getByProductCode(String id)
|
protected String |
getCacheUniqueID()
This is an overriding method. |
Currency |
getCurrency()
|
Date |
getExpiryFor(Date begins)
|
int |
getId()
WRITEME TODO: document this method (brpocock, Oct 13, 2009) |
BigDecimal |
getPrice()
TODO: document this method (brpocock, Oct 13, 2009) |
long |
getPrivilegeDays()
|
int |
getPrivilegeMonths()
|
String |
getProductCode()
TODO: document this method (brpocock, Oct 13, 2009) |
int |
getProductID()
|
int |
getRenewMonths()
WRITEME TODO: document this method (brpocock, Oct 13, 2009) |
String |
getTitle()
|
boolean |
isAutoRenew()
TODO: document this method (brpocock, Oct 13, 2009) |
boolean |
isAvailable()
|
protected void |
set(ResultSet rs)
This is an overriding method. |
void |
setPrice(BigDecimal price1)
TODO: document this method (brpocock, Sep 23, 2009) |
Methods inherited from class org.starhope.appius.sql.SQLPeerDatum |
---|
changed, findInCache, get, 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 boolean autoRenew
private boolean available
private int id
private BigDecimal price
private String productCode
private long renewDays
private int renewMonths
private String title
Constructor Detail |
---|
public Enrolment(BigDecimal d)
d
- WRITEMEprotected Enrolment(ResultSet resultSet) throws NotFoundException
resultSet
- WRITEME
NotFoundException
- WRITEMEMethod Detail |
---|
public static Enrolment[] getAvailableEnrolments()
public static Enrolment getByID(int id) throws NotFoundException
id
- WRITEME
NotFoundException
- WRITEMEpublic static Enrolment getByProductCode(String id) throws NotFoundException
id
- the database ID of the Enrolment
NotFoundException
- if the ID doesn't point to a valid
enrolmentpublic void flush()
flush
in class SQLPeerDatum
SQLPeerDatum.flush()
protected String getCacheUniqueID()
getCacheUniqueID
in class SQLPeerDatum
SQLPeerDatum.getCacheUniqueID()
public Currency getCurrency()
public Date getExpiryFor(Date begins)
begins
- WRITEME
public int getId()
public BigDecimal getPrice()
public long getPrivilegeDays()
public int getPrivilegeMonths()
public String getProductCode()
public int getProductID()
public int getRenewMonths()
public String getTitle()
public boolean isAutoRenew()
public boolean isAvailable()
protected void set(ResultSet rs) throws SQLException
set
in class SQLPeerDatum
rs
- 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 setPrice(BigDecimal price1)
price1
- WRITEME
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |