|
||||||||||
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
- WRITEMEpublic static ShippingOrder get(String id) throws RuntimeException, NotFoundException
id
- WRITEME
NotFoundException
- WRITEME
RuntimeException
- WRITEMEpublic UserAddress getAddress()
getAddress
in interface Invoiceable
Invoiceable.getAddress()
public BigDecimal getAmount()
getAmount
in interface Invoiceable
Invoiceable.getAmount()
public Person getBuyer()
Invoiceable
getBuyer
in interface Invoiceable
Invoiceable.getBuyer()
public Currency getCurrency()
getCurrency
in interface Invoiceable
Invoiceable.getAmount()
Invoiceable.getCurrency()
public String getInvoiceID()
getInvoiceID
in interface Invoiceable
Invoiceable.getInvoiceID()
public char getInvoiceIDPrefix()
getInvoiceIDPrefix
in interface Invoiceable
Invoiceable.getInvoiceIDPrefix()
public UserAddress getShippingAddress()
public UserAddress getShipToAddress()
getShipToAddress
in interface ShippingInvoice
ShippingInvoice.getShipToAddress()
public String getShipToOrganization()
getShipToOrganization
in interface ShippingInvoice
ShippingInvoice.getShipToOrganization()
public Person getShipToUser()
getShipToUser
in interface ShippingInvoice
ShippingInvoice.getShipToUser()
public String getTitle()
getTitle
in interface Invoiceable
Invoiceable.getTitle()
public Person getUser()
public void set(org.json.JSONObject o)
CastsToJSON
set
in interface CastsToJSON
set
in class BaseDatum
o
- 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
- WRITEMEpublic 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 CastsToJSON
toJSON
in class BaseDatum
BaseDatum.toJSON()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |