org.starhope.appius.mb
Class Enrolment

java.lang.Object
  extended by org.starhope.appius.mb.Enrolment

public class Enrolment
extends Object

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.

Author:
brpocock
See Also:
UserEnrolment for actual subscriptions/registrations

Field Summary
private  double price
           
 
Constructor Summary
Enrolment(double d)
           
 
Method Summary
static Enrolment get(String id)
           
static Enrolment getByID(int id)
           
 Currency getCurrency()
           
 Date getExpiryFor(Date begins)
           
 BigDecimal getPrice()
           
 int getPrivilegeDays()
           
 int getPrivilegeMonths()
           
 int getProductID()
           
 String getTitle()
           
 boolean isAvailable()
           
 void setPrice(double price)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

price

private double price
Constructor Detail

Enrolment

public Enrolment(double d)
Parameters:
d -
Method Detail

get

public static Enrolment get(String id)
                     throws NotFoundException
Parameters:
id - the database ID of the Enrolment
Returns:
Enrolment object
Throws:
NotFoundException - if the ID doesn't point to a valid enrolment

getByID

public static Enrolment getByID(int id)
                         throws NotFoundException
Throws:
NotFoundException

getCurrency

public Currency getCurrency()
Returns:

getExpiryFor

public Date getExpiryFor(Date begins)
Parameters:
begins -
Returns:

getPrice

public BigDecimal getPrice()

getPrivilegeDays

public int getPrivilegeDays()
Returns:

getPrivilegeMonths

public int getPrivilegeMonths()
Returns:

getProductID

public int getProductID()
Returns:

getTitle

public String getTitle()
Returns:

isAvailable

public boolean isAvailable()
Returns:

setPrice

public void setPrice(double price)