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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DBCurrencies
public DBCurrencies()
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 connectionsBaseCurrency - 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