|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.knowgate.dataobjs.DBPersist
com.knowgate.hipergate.AbstractOrder
com.knowgate.hipergate.Order
public class Order
Shopping Order.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
java.util.Map.Entry<K,V> |
| Field Summary | |
|---|---|
static short |
ClassId
|
| Fields inherited from class com.knowgate.hipergate.AbstractOrder |
|---|
oBuyer, oLines, oSeller, sLinesTable, sPrimaryKey |
| Fields inherited from class com.knowgate.dataobjs.DBPersist |
|---|
AllVals, sAuditCls, sAuditUsr, sTransactId |
| Constructor Summary | |
|---|---|
Order()
Create empty Order |
|
Order(JDCConnection oConn,
java.lang.String sOrderId)
Load Order from database including all its lines |
|
Order(java.lang.String sOrderId)
Create Order and set its GUID |
|
| Method Summary | |
|---|---|
void |
activate(JDCConnection oConn,
java.lang.String sOrderId)
Activate an Order For a given WorkArea only one order can be active at a time. |
DespatchAdvice |
createDespatchAdvice(JDCConnection oConn,
boolean bIncludePrices)
Create a Dispatch Note for this Order The new Dispatch Note is given the same GUID as the current order |
Invoice |
createInvoice(JDCConnection oConn)
Create an Invoice for this Order The new Invoice is given the same GUID as the current order |
boolean |
delete(JDCConnection oConn)
Delete Order |
static boolean |
delete(JDCConnection oConn,
java.lang.String sOrderId)
Delete order |
boolean |
despatched()
Whether or not this order has an associated despatch advice |
static Order |
getActiveOrder(JDCConnection oConn,
java.lang.String sWorkAreaId)
Get active order for a WorkArea |
java.lang.String |
getDespatchAdvice()
Get despatch advice associated to this order |
java.lang.String |
getInvoice()
Get invoice associated to this order |
OrderLine |
getLine(JDCConnection oConn,
int iPgLine)
Get order line by number |
DBSubset |
getLines(JDCConnection oConn)
Get Order Lines as a DBSubset |
boolean |
invoiced()
Whether or not this order has an associated invoice |
boolean |
load(JDCConnection oConn,
java.lang.Object[] PKVals)
Load Order with its associated Addresses |
boolean |
load(JDCConnection oConn,
java.lang.String sGuOrder)
Load Order with its associated Addresses |
boolean |
store(JDCConnection oConn)
Store Order |
java.lang.String |
toXML()
Get order as an XML document Character encoding is set to UTF-8 |
java.lang.String |
toXML(JDCConnection oConn,
java.lang.String sLocale)
Get despatch advice as an XML document Character encoding is set to UTF-8 |
java.lang.String |
toXML(java.lang.String sIdent)
Get order as an XML document Character encoding is set to UTF-8 |
java.lang.String |
toXML(java.lang.String sIdent,
java.lang.String sDelim)
Get order as an XML document Character encoding is set to UTF-8 |
| Methods inherited from class com.knowgate.hipergate.AbstractOrder |
|---|
addProduct, addProduct, addProduct, computeSubtotal, computeSubtotal, computeTaxes, computeTaxes, computeTotal, computeTotal, formatCurrency, formatPercentage, getBillAddress, getCurrencyFormat, getDecimalFormated, getFloatFormated, getLines, getLocale, removeAllProducts, removeProduct, setCurrencyFormat, setLocale, setLocale, setLocale |
| Methods inherited from class com.knowgate.dataobjs.DBPersist |
|---|
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public static final short ClassId
| Constructor Detail |
|---|
public Order()
public Order(java.lang.String sOrderId)
public Order(JDCConnection oConn,
java.lang.String sOrderId)
throws java.sql.SQLException
Load Order from database including all its lines
oConn - Database ConnectionsOrderId - Order GUID
java.sql.SQLException| Method Detail |
|---|
public boolean load(JDCConnection oConn,
java.lang.Object[] PKVals)
throws java.sql.SQLException
load in class AbstractOrderoConn - JDCConnectionPKVals - Array with a single element Object[1]{(String)gu_order}
java.sql.SQLException
public boolean load(JDCConnection oConn,
java.lang.String sGuOrder)
throws java.sql.SQLException
load in class DBPersistoConn - JDCConnectionsGuOrder - Order GUID
java.sql.SQLException
public boolean store(JDCConnection oConn)
throws java.sql.SQLException
store in class DBPersistoConn - Database Connection
If gu_order is null then a new GUID is automatically assigned.java.sql.SQLException
public boolean delete(JDCConnection oConn)
throws java.sql.SQLException
Delete Order
delete in class DBPersistoConn -
java.sql.SQLException
public OrderLine getLine(JDCConnection oConn,
int iPgLine)
throws java.sql.SQLException
oConn - JDCConnectioniPgLine - int Line number [1..n] as as at k_order_lines.pg_line
java.sql.SQLException
public DBSubset getLines(JDCConnection oConn)
throws java.sql.SQLException
getLines in class AbstractOrderoConn - Database Connection
| gu_order | pg_line | gu_product | nm_product | pr_sale | nu_quantity | id_unit | pr_total | pct_tax_rate | is_tax_included | tx_promotion | tx_options | gu_item | id_ref |
| Order GUID | Line Number | Product GUID | Product Name | Sale Price | Quantity Ordered | Unit for quantity | Total Price | % of Tax Rate | 1 if tax included | Promotion Text | Additional Options | GUID of ordered item |
java.sql.SQLExceptionpublic java.lang.String getDespatchAdvice()
public java.lang.String getInvoice()
public DespatchAdvice createDespatchAdvice(JDCConnection oConn,
boolean bIncludePrices)
throws java.sql.SQLException
Create a Dispatch Note for this Order
The new Dispatch Note is given the same GUID as the current order
oConn - JDCConnectionbIncludePrices - boolean whether or not to save prices at the new Dispatch Order
java.sql.SQLException
public Invoice createInvoice(JDCConnection oConn)
throws java.sql.SQLException
Create an Invoice for this Order
The new Invoice is given the same GUID as the current order
oConn - JDCConnection
java.sql.SQLException
public void activate(JDCConnection oConn,
java.lang.String sOrderId)
throws java.sql.SQLException
Activate an Order
For a given WorkArea only one order can be active at a time.
oConn - Database ConnectionsOrderId - GUID of Order to Activate
java.sql.SQLExceptionpublic boolean despatched()
public boolean invoiced()
public java.lang.String toXML()
throws java.lang.IllegalStateException
Get order as an XML document
Character encoding is set to UTF-8
toXML in class DBPersistjava.lang.IllegalStateException - if order lines are not loaded or buyer is not set or seller is not set
public java.lang.String toXML(java.lang.String sIdent,
java.lang.String sDelim)
throws java.lang.IllegalStateException
Get order as an XML document
Character encoding is set to UTF-8
toXML in class DBPersistsIdent - Number of blank spaces for left padding at every line.sDelim - Line delimiter (usually "\n" or "\r\n")
java.lang.IllegalStateException - if order lines are not loaded or buyer is not set or seller is not set
public java.lang.String toXML(java.lang.String sIdent)
throws java.lang.IllegalStateException
Get order as an XML document
Character encoding is set to UTF-8
toXML in class DBPersistsIdent - Number of blank spaces for left padding at every line.
java.lang.IllegalStateException - if order lines are not loaded or buyer is not set or seller is not set
public java.lang.String toXML(JDCConnection oConn,
java.lang.String sLocale)
throws java.lang.IllegalStateException
Get despatch advice as an XML document
Character encoding is set to UTF-8
oConn - JDCConnection Openend JDBC database connectionsLocale - String Locale for output formatting
java.lang.IllegalStateException - if invoice lines are not loaded or buyer is not set or seller is not set
public static boolean delete(JDCConnection oConn,
java.lang.String sOrderId)
throws java.sql.SQLException
oConn - JDCConnectionsOrderId - String Order GUID
java.sql.SQLException
public static Order getActiveOrder(JDCConnection oConn,
java.lang.String sWorkAreaId)
throws java.sql.SQLException
oConn - JDCConnectionsWorkAreaId - String WorkArea GUID
java.sql.SQLException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||