IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.bc.fx.impl
Class RatesRepositoryDB2Impl

java.lang.Object
  extended by com.ibm.btt.bc.fx.impl.RatesRepositoryDB2Impl
All Implemented Interfaces:
RatesRepository

public class RatesRepositoryDB2Impl
extends java.lang.Object
implements RatesRepository

This class accesses the DB2 table containing the Foreign Exchange conversion rates.


Field Summary
static java.lang.String BUYRATE
           
static java.lang.String FROMCURRENCY
           
static java.lang.String FROMMONETARYITEM
           
static java.lang.String SELLRATE
           
static java.lang.String TOCURRENCY
           
static java.lang.String TOMONETARYITEM
           
 
Constructor Summary
RatesRepositoryDB2Impl()
           
 
Method Summary
 java.util.Set<java.lang.String> getAllSupportedCurrencies()
          Returns all supported currency codes in a Set.
 java.lang.String getDbSchema()
          Returns the database schema name of the rates table.
 java.util.Set<java.lang.String> getDefinedMonetaryItems()
          Returns all defined monetary item types.
 java.lang.String getJndiName()
           
 java.math.BigDecimal getRate(RatesQueryRequest request, boolean isBuy)
          Returns the foreign exchange rate according to the given parameters.
 void setDbSchema(java.lang.String dbSchema)
          Sets the database schema name of the rates table.
 void setJndiName(java.lang.String jndiName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FROMCURRENCY

public static final java.lang.String FROMCURRENCY
See Also:
Constant Field Values

TOCURRENCY

public static final java.lang.String TOCURRENCY
See Also:
Constant Field Values

FROMMONETARYITEM

public static final java.lang.String FROMMONETARYITEM
See Also:
Constant Field Values

TOMONETARYITEM

public static final java.lang.String TOMONETARYITEM
See Also:
Constant Field Values

BUYRATE

public static final java.lang.String BUYRATE
See Also:
Constant Field Values

SELLRATE

public static final java.lang.String SELLRATE
See Also:
Constant Field Values
Constructor Detail

RatesRepositoryDB2Impl

public RatesRepositoryDB2Impl()
Method Detail

getDbSchema

public java.lang.String getDbSchema()
Returns the database schema name of the rates table.

Returns:
the schema name of the rates table

setDbSchema

public void setDbSchema(java.lang.String dbSchema)
Sets the database schema name of the rates table.

Parameters:
dbSchema - the schema name of the rates table

getAllSupportedCurrencies

public java.util.Set<java.lang.String> getAllSupportedCurrencies()
                                                          throws ForeignExchangeException
Description copied from interface: RatesRepository
Returns all supported currency codes in a Set.

Specified by:
getAllSupportedCurrencies in interface RatesRepository
Returns:
the Set containing all supported currency codes
Throws:
ForeignExchangeException - occurs if any error accessing the Set

getDefinedMonetaryItems

public java.util.Set<java.lang.String> getDefinedMonetaryItems()
                                                        throws ForeignExchangeException
Description copied from interface: RatesRepository
Returns all defined monetary item types.

Specified by:
getDefinedMonetaryItems in interface RatesRepository
Returns:
the Set containing all supported monetary item types
Throws:
ForeignExchangeException - occurs if any error accessing the Set

getRate

public java.math.BigDecimal getRate(RatesQueryRequest request,
                                    boolean isBuy)
                             throws ForeignExchangeException
Description copied from interface: RatesRepository
Returns the foreign exchange rate according to the given parameters.

Specified by:
getRate in interface RatesRepository
Parameters:
request - the RatesQueryRequest identifying the request data
isBuy - true if the requested rate is a buy rate, otherwise it should be false
Returns:
the requested rate, null if the requested rate is not found in the datastorage
Throws:
ForeignExchangeException - occurs if any error accessing the rate

getJndiName

public java.lang.String getJndiName()

setJndiName

public void setJndiName(java.lang.String jndiName)

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009