|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.appius.util.ManagedReferenceHolder
org.starhope.appius.util.BaseDatum
org.starhope.appius.mb.ShippingOrder
public class ShippingOrder
WRITEME
| Field Summary | |
|---|---|
private BigDecimal |
amount
WRITEME |
private com.sun.sgs.app.ManagedReference<UserAddress> |
billingAddress
WRITEME |
private com.sun.sgs.app.ManagedReference<User> |
buyer
WRITEME |
private Currency |
currency
WRITEME |
private String |
invoiceNumber
WRITEME |
private com.sun.sgs.app.ManagedReference<User> |
recipient
WRITEME |
private static long |
serialVersionUID
WRITEME |
private com.sun.sgs.app.ManagedReference<UserAddress> |
shippingAddress
WRITEME |
private String |
shipToOrganization
WRITEME |
private String |
title
WRITEME |
| Fields inherited from class org.starhope.appius.util.BaseDatum |
|---|
database_id |
| Constructor Summary | |
|---|---|
ShippingOrder()
|
|
| Method Summary | |
|---|---|
static ShippingOrder |
get(org.json.JSONObject object)
|
static ShippingOrder |
get(String id)
|
UserAddress |
getAddress()
|
BigDecimal |
getAmount()
|
Person |
getBuyer()
TODO: refactor payment gateways to use the buyer information: promote this up to Invoiceable interface. |
Currency |
getCurrency()
|
String |
getInvoiceID()
|
char |
getInvoiceIDPrefix()
|
UserAddress |
getShippingAddress()
|
UserAddress |
getShipToAddress()
|
String |
getShipToOrganization()
|
Person |
getShipToUser()
|
String |
getTitle()
|
Person |
getUser()
|
void |
set(org.json.JSONObject o)
This method will attempt to set the data contents of this object to the values derived from the JSON object being passed-in. |
void |
setAddress(UserAddress userAddress)
|
void |
setBuyer(User newBuyer)
|
void |
setInvoiceNumber(String string)
|
void |
setShippingAddress(UserAddress shippingAddress)
|
void |
setShipToAddress(UserAddress userAddress)
|
void |
setShipToOrganization(String string)
|
void |
setTitle(String string)
|
void |
setUser(User newUser)
|
org.json.JSONObject |
toJSON()
This returns a copy of the object's data cast into a JSON form. |
| Methods inherited from class org.starhope.appius.util.BaseDatum |
|---|
changed, commitToDatabase, delete, equals, flush, get, get, getID, getUniqueBoundName, readExternal, refJSON, setID, sqlDateTime, writeExternal |
| Methods inherited from class org.starhope.appius.util.ManagedReferenceHolder |
|---|
deref, setRef |
| 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 BigDecimal amount
private com.sun.sgs.app.ManagedReference<UserAddress> billingAddress
private com.sun.sgs.app.ManagedReference<User> buyer
private Currency currency
private String invoiceNumber
private com.sun.sgs.app.ManagedReference<User> recipient
private com.sun.sgs.app.ManagedReference<UserAddress> shippingAddress
private String shipToOrganization
private String title
| Constructor Detail |
|---|
public ShippingOrder()
| Method Detail |
|---|
public static ShippingOrder get(org.json.JSONObject object)
throws RuntimeException,
NotFoundException,
org.json.JSONException
object - WRITEME
org.json.JSONException - WRITEME
NotFoundException - WRITEME
RuntimeException - WRITEME
public static ShippingOrder get(String id)
throws RuntimeException,
NotFoundException
id - WRITEME
NotFoundException - WRITEME
RuntimeException - WRITEMEpublic UserAddress getAddress()
getAddress in interface InvoiceableInvoiceable.getAddress()public BigDecimal getAmount()
getAmount in interface InvoiceableInvoiceable.getAmount()public Person getBuyer()
Invoiceable
getBuyer in interface InvoiceableInvoiceable.getBuyer()public Currency getCurrency()
getCurrency in interface InvoiceableInvoiceable.getAmount()Invoiceable.getCurrency()public String getInvoiceID()
getInvoiceID in interface InvoiceableInvoiceable.getInvoiceID()public char getInvoiceIDPrefix()
getInvoiceIDPrefix in interface InvoiceableInvoiceable.getInvoiceIDPrefix()public UserAddress getShippingAddress()
public UserAddress getShipToAddress()
getShipToAddress in interface ShippingInvoiceShippingInvoice.getShipToAddress()public String getShipToOrganization()
getShipToOrganization in interface ShippingInvoiceShippingInvoice.getShipToOrganization()public Person getShipToUser()
getShipToUser in interface ShippingInvoiceShippingInvoice.getShipToUser()public String getTitle()
getTitle in interface InvoiceableInvoiceable.getTitle()public Person getUser()
public void set(org.json.JSONObject o)
CastsToJSON
set in interface CastsToJSONset in class BaseDatumo - The JSON object containing a the new data for this
object.CastsToJSON.set(org.json.JSONObject)public void setAddress(UserAddress userAddress)
userAddress - the billing address of the buyerpublic void setBuyer(User newBuyer)
newBuyer - WRITEME
public void setInvoiceNumber(String string)
throws DataException
string - the invoice number for this object. Must be
compatible with its prefix.
DataException - if the invoice number mismatches the prefix
for this classpublic void setShippingAddress(UserAddress shippingAddress)
shippingAddress - the shippingAddress to setpublic void setShipToAddress(UserAddress userAddress)
userAddress - the address to which to ship the product(s)
purchasedpublic void setShipToOrganization(String string)
string - The organization name to apply to the shipping
addresspublic void setTitle(String string)
string - The title of this orderpublic void setUser(User newUser)
newUser - WRITEMEpublic org.json.JSONObject toJSON()
CastsToJSON
toJSON in interface CastsToJSONtoJSON in class BaseDatumBaseDatum.toJSON()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||