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 DBCurrencies

    java.lang.Object
      com.knowgate.hipergate.DBCurrencies

    public class DBCurrencies

extends java.lang.Object

Maintenance and query routines for k_lu_currencies and k_lu_currencies_history tables

Constructor Summary
`DBCurrencies()`

Method Summary
`static CurrencyCode` | `currencyCodeFor(int iNumCode)`
`static CurrencyCode` | `currencyCodeFor(java.lang.String sAlphaCode)`
`static java.util.ArrayList<CurrencyCode>` | `currencyCodes(java.sql.Connection oConn)`
`static void` | `main(java.lang.String[] args)`
`static void` | `updateConversionRates(java.sql.Connection oConn, java.lang.String sBaseCurrency)` Update nu_conversion column of k_lu_currencies for a given base currency Conversion rates are computed by calling a free web service.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBCurrencies

    public DBCurrencies()

Method Detail

### currencyCodes

    public static java.util.ArrayList<CurrencyCode> currencyCodes(java.sql.Connection oConn)
                                                           throws java.sql.SQLException

  Throws:
    `java.sql.SQLException`

### currencyCodeFor

    public static CurrencyCode currencyCodeFor(int iNumCode)
                                        throws java.lang.NullPointerException

  Throws:
    `java.lang.NullPointerException`

### currencyCodeFor

    public static CurrencyCode currencyCodeFor(java.lang.String sAlphaCode)
                                        throws java.lang.NullPointerException

  Throws:
    `java.lang.NullPointerException`

### updateConversionRates

    public static void updateConversionRates(java.sql.Connection oConn,
                                             java.lang.String sBaseCurrency)
                                      throws java.sql.SQLException,
                                             java.lang.NullPointerException,
                                             java.lang.NumberFormatException

  Update nu_conversion column of k_lu_currencies for a given base currency

  Conversion rates are computed by calling a free web service. Each time a conversion is get a new row is inserted at k_lu_currencies_history with the conversion rate found at current timestamp

  Parameters:
    `oConn` - JDBC database connection
    `sBaseCurrency` - Base Currency alphanumeric 3 letter uppercase ISO code
  Throws:
    `java.sql.SQLException`
    `java.lang.NullPointerException`
    `java.lang.NumberFormatException`

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

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