Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipergate
Class DespatchAdvice

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.hipergate.AbstractOrder
              com.knowgate.hipergate.DespatchAdvice

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public class DespatchAdvice

extends AbstractOrder

Despatch Advice

See Also:
  Serialized Form

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
`DespatchAdvice()`
`DespatchAdvice(java.lang.String sDespacthAdviceId)`

Method Summary
`boolean` | `delete(JDCConnection oConn)` Delete Dispatch Note
`DBSubset` | `getLines(JDCConnection oConn)` Get a DBSubset with all lines of this Dispatch Note The Despatch Advice must have been previously loaded or a NullPointerException will be thrown
`java.lang.String[]` | `getOrders()` Get Orders for this Invoice Orders can only be get if Invoice has been previously loaded, else this method will return null
`boolean` | `load(JDCConnection oConn, java.lang.Object[] PKVals)` Load Despatch Advice with its associated Addresses
`boolean` | `load(JDCConnection oConn, java.lang.String sGuDespatchAdvice)` Load Despatch Advice with its associated Addresses
`static int` | `nextVal(JDCConnection oConn, java.lang.String sGuWorkArea)` Get next value for field pg_despatch in a given WorkArea
`boolean` | `store(JDCConnection oConn)` Store despatch note If no value for gu_despatch is specified then a new one is automatically assigned.
`java.lang.String` | `toXML()` Get despatch advice 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 despatch advice as an XML document Character encoding is set to UTF-8
`java.lang.String` | `toXML(java.lang.String sIdent, java.lang.String sDelim)` Get despatch advice 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

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### DespatchAdvice

    public DespatchAdvice()

### DespatchAdvice

    public DespatchAdvice(java.lang.String sDespacthAdviceId)

Method Detail

### getLines

    public DBSubset getLines(JDCConnection oConn)
                      throws java.sql.SQLException,
                             java.lang.NullPointerException

  Get a DBSubset with all lines of this Dispatch Note

  The Despatch Advice must have been previously loaded or a NullPointerException will be thrown

  Specified by:
    `getLines` in class `AbstractOrder`
  Parameters:
    `oConn` - JDCConnection
  Returns:
    DBSubset with columns gu_dispacth,pg_line,pr_sale,nu_quantity,id_unit,pr_total,pct_tax_rate,is_tax_included,nm_product,gu_product,gu_item,tx_promotion,tx_options,id_ref
  Throws:
    `java.sql.SQLException`
    `java.lang.NullPointerException`

### getOrders

    public java.lang.String[] getOrders()

  Get Orders for this Invoice

  Orders can only be get if Invoice has been previously loaded, else this method will return null

  Returns:
    String[]

### load

    public boolean load(JDCConnection oConn,
                        java.lang.Object[] PKVals)
                 throws java.sql.SQLException

  Load Despatch Advice with its associated Addresses

  Overrides:
    `load` in class `AbstractOrder`
  Parameters:
    `oConn` - JDCConnection
    `PKVals` - Array with a single element Object[1]{(String)gu_despacth}
  Returns:
    boolean true is Despacth Advice was found, false otherwise
  Throws:
    `java.sql.SQLException`

### load

    public boolean load(JDCConnection oConn,
                        java.lang.String sGuDespatchAdvice)
                 throws java.sql.SQLException

  Load Despatch Advice with its associated Addresses

  Overrides:
    `load` in class `DBPersist`
  Parameters:
    `oConn` - JDCConnection
    `sGuDespatchAdvice` - Despatch Advice GUID
  Returns:
    boolean true is Despacth Advice was found, false otherwise
  Throws:
    `java.sql.SQLException`

### store

    public boolean store(JDCConnection oConn)
                  throws java.sql.SQLException

  Store despatch note

  If no value for gu_despatch is specified then a new one is automatically assigned.
  If no value for pg_despatch is specified then a new one is automatically assigned by looking at k_despatch_next table and updating it afterwards.
  This method updates dt_modified to current datetime as a side effect iif Dispatch Note did not previously exist at the database.

  Overrides:
    `store` in class `DBPersist`
  Parameters:
    `oConn` - JDCConnection
  Returns:
    boolean
  Throws:
    `java.sql.SQLException`

### delete

    public boolean delete(JDCConnection oConn)
                   throws java.sql.SQLException

  Delete Dispatch Note

  Overrides:
    `delete` in class `DBPersist`
  Parameters:
    `oConn` - Database Connection
  Returns:
    true if register was successfully erased, false if not.
  Throws:
    `java.sql.SQLException`

### toXML

    public java.lang.String toXML()
                           throws java.lang.IllegalStateException

  Get despatch advice as an XML document

  Character encoding is set to UTF-8

  Overrides:
    `toXML` in class `DBPersist`
  Returns:
    An XML String formatted according to OASIS Universal Universal Business Language Specification
  Throws:
    `java.lang.IllegalStateException` - if despatch advice lines are not loaded or buyer is not set or seller is not set
  See Also:
    OASIS Universal Business Language 1.0

### toXML

    public java.lang.String toXML(java.lang.String sIdent,
                                  java.lang.String sDelim)
                           throws java.lang.IllegalStateException

  Get despatch advice as an XML document

  Character encoding is set to UTF-8

  Overrides:
    `toXML` in class `DBPersist`
  Parameters:
    `sIdent` - Number of blank spaces for left padding at every line.
    `sDelim` - Line delimiter (usually "\n" or "\r\n")
  Returns:
    An XML String formatted according to OASIS Universal Universal Business Language Specification
  Throws:
    `java.lang.IllegalStateException` - if despatch advice lines are not loaded or buyer is not set or seller is not set
  See Also:
    OASIS Universal Business Language 1.0

### toXML

    public java.lang.String toXML(java.lang.String sIdent)
                           throws java.lang.IllegalStateException

  Get despatch advice as an XML document

  Character encoding is set to UTF-8

  Overrides:
    `toXML` in class `DBPersist`
  Parameters:
    `sIdent` - Number of blank spaces for left padding at every line.
  Returns:
    An XML String formatted according to OASIS Universal Universal Business Language Specification
  Throws:
    `java.lang.IllegalStateException` - if despatch advice lines are not loaded or buyer is not set or seller is not set
  See Also:
    OASIS Universal Business Language 1.0

### toXML

    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

  Parameters:
    `oConn` - JDCConnection Openend JDBC database connection
    `sLocale` - String Locale for output formatting
  Returns:
    An XML String formatted according to OASIS Universal Universal Business Language Specification
    Sample output <?xml version="1.0" encoding="UTF-8"?>
    <DespatchAdvice xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:cur="urn:oasis:names:specification:ubl:schema:xsd:CurrencyCode-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ID>2</ID>
    <GUID>7f000001106a7669d5a100001e7bc8ca</GUID>
    <cbc:IssueDate/>
    <DocumentStatusCode>SHIPPED</DocumentStatusCode>
    <cbc:Note><![CDATA[Deliver before 6 P.M.]]></cbc:Note>
    <LineItemCountNumeric>2</LineItemCountNumeric>
    <cac:OrderReference>
    <cac:BuyersID><![CDATA[51409272]]></cac:BuyersID>
    <cac:SellerID><![CDATA[B82568718]]></cac:SellerID>
    </cac:OrderReference>
    <cac:BuyerParty>
    <cac:Party>
    <cac:PartyName><cbc:Name><![CDATA[Paul Klein]]></cbc:Name></cac:PartyName>
    <cac:Address>
    <ID>7f000001106709e1bda10000ec419d26</ID>
    <cbc:PostBox></cbc:PostBox>
    <cbc:StreetName><![CDATA[Bulbury]]></cbc:StreetName>
    <cbc:AdditionalStreetName><![CDATA[ST]]></cbc:AdditionalStreetName>
    <cbc:BuildingName><![CDATA[]]></cbc:BuildingName>
    <cbc:BuildingNumber><![CDATA[80]]></cbc:BuildingNumber>
    <cbc:CityName><![CDATA[]]></cbc:CityName>
    <cbc:PostalZone></cbc:PostalZone>
    <cbc:CountrySubentity><![CDATA[]]></cbc:CountrySubentity>
    <cbc:CountrySubentityCode></cbc:CountrySubentityCode>
    <cbc:AddressLine><![CDATA[]]></cbc:AddressLine>
    <Country><![CDATA[]]></Country>
    </cac:Address>
    </cac:Party>
    <cac:AccountsContact>
    <cbc:Name><![CDATA[]]></cbc:Name>
    <cbc:Telephone><![CDATA[]]></cbc:Telephone>
    </cac:AccountsContact>
    </cac:BuyerParty>
    <cac:SellerParty>
    <cac:Party>
    <cac:PartyName><cbc:Name><![CDATA[Know Gate Ltd.]]></cbc:Name></cac:PartyName>
    <cac:Address>
    <ID>7f0000011067057c4ef100008c688128</ID>
    <cbc:StreetName><![CDATA[Wesleyan]]></cbc:StreetName>
    <cbc:AdditionalStreetName><![CDATA[ST]]></cbc:AdditionalStreetName>
    <cbc:BuildingName><![CDATA[]]></cbc:BuildingName>
    <cbc:BuildingNumber><![CDATA[107]]></cbc:BuildingNumber>
    <cbc:CityName><![CDATA[Boston]]></cbc:CityName>
    <cbc:PostalZone></cbc:PostalZone>
    <cbc:CountrySubentity><![CDATA[MA]]></cbc:CountrySubentity>
    <cbc:CountrySubentityCode></cbc:CountrySubentityCode>
    <cbc:AddressLine><![CDATA[]]></cbc:AddressLine>
    <Country><![CDATA[United States]]></Country>
    </cac:Address>
    </cac:Party>
    <cac:AccountsContact>
    <cbc:Name><![CDATA[Charles Robertson]]></cbc:Name>
    <cbc:Telephone><![CDATA[1-800callcharles]]></cbc:Telephone>
    </cac:AccountsContact>
    </cac:SellerParty>
    <cac:Delivery>
    <cac:DeliveryAddress>
    <ID>7f00000110670211e12100002a4874df</ID>
    <cbc:StreetName><![CDATA[Yokohama]]></cbc:StreetName>
    <cbc:AdditionalStreetName><![CDATA[ST]]></cbc:AdditionalStreetName>
    <cbc:BuildingName><![CDATA[]]></cbc:BuildingName>
    <cbc:BuildingNumber><![CDATA[1310]]></cbc:BuildingNumber>
    <cbc:CityName><![CDATA[]]></cbc:CityName>
    <cbc:PostalZone></cbc:PostalZone>
    <cbc:CountrySubentity><![CDATA[]]></cbc:CountrySubentity>
    <cbc:CountrySubentityCode></cbc:CountrySubentityCode>
    <cbc:AddressLine><![CDATA[]]></cbc:AddressLine>
    <Country><![CDATA[us]]></Country>
    </cac:DeliveryAddress>
    </cac:Delivery>
    <cac:DespatchLine>
    <ID>1</ID>
    <cbc:DeliveredQuantity>1</cbc:DeliveredQuantity>
    <cac:Item>
    <cbc:Description><![CDATA[Tux Earrings]]></cbc:Description>
    </cac:Item>
    </cac:DespatchLine>
    <cac:DespatchLine>
    <ID>2</ID>
    <cbc:DeliveredQuantity>1</cbc:DeliveredQuantity>
    <cbc:LineExtensionAmount amountCurrencyCodeListVersionID="0.3" amountCurrencyID="978">999.99</cbc:LineExtensionAmount>
    <cbc:TaxTotalAmount amountCurrencyCodeListVersionID="0.3" amountCurrencyID="978">0.16</cbc:TaxTotalAmount>
    <cac:Item>
    <cbc:Description><![CDATA[Tux Pendant]]></cbc:Description>
    </cac:Item>
    <BasePrice amountCurrencyCodeListVersionID="0.3" amountCurrencyID="978">999.99</BasePrice>
    </cac:DespatchLine>
    </DespatchAdvice>
  Throws:
    `java.lang.IllegalStateException` - if invoice lines are not loaded or buyer is not set or seller is not set
  See Also:
    OASIS Universal Business Language 1.0

### nextVal

    public static int nextVal(JDCConnection oConn,
                              java.lang.String sGuWorkArea)
                       throws java.sql.SQLException

  Get next value for field pg_despatch in a given WorkArea

  Parameters:
    `oConn` - JDCConnection JDBC Connection
    `sGuWorkArea` - String WorkArea GUID
  Returns:
    int Next unused despatch note number
  Throws:
    `java.sql.SQLException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD