The raw foreign exchange rates are typically stored in datastorage, such as DB2® database. The Rates Repository layer's responsibility is to decouple the rate conversion algorithm from the concrete datastorage of the raw rates.
The RatesRepositoryFileImpl is an implementation of retrieving raw rates from XML file by leveraging the BTT ElementFactory, while the RatesRepositoryDB2Impl retrieves rates from a FxRates table in a DB2 database.
Column | Description | SQL Type | Size | Java™ Type |
---|---|---|---|---|
FROMCURRENCY (PK) | Identifies the source currency. | CHAR | 3 | String |
TOCURRENCY (PK) | Identifies the destination currency. | CHAR | 3 | String |
FROMMONETARYITEM (PK) | Identifies how the financial institution received the source currency. | CHAR | 2 | String |
TOMONETARYITEM (PK) | Identifies how the financial institution received the destination currency. | CHAR | 2 | String |
BUYRATE | Contains the rate at which the financial institution buys the destination currency. Its format is fixed to six significant digits. | CHAR | 8 | String |
SELLRATE | Contains the rate at which the financial institution sells the destination currency. Its format is fixed to six significant digits. | CHAR | 9 | String |