com.sage.accpac.sm
Interface Currency

All Known Implementing Classes:
CurrencyImpl

public interface Currency

Provides details of a currency code set up in Common Services
An object of this class can be obtained from a DBLink object's getCurrency(...) method. An object of this class generally reflects the state of the data when the object was constructed, except that the block master properties reflect the state when those calls are made.


Nested Class Summary
static class Currency.BlockDateMatch
          Indicates the date matching method used to determine if a currency belongs to a currency block
static class Currency.DateMatch
          Indicates the date matching method used when determining an exchange rate with respect to a given date
static class Currency.NegativeDisplay
          Indicates how negative currency amounts should be displayed
static class Currency.SymbolDisplay
          Indicates how the currency symbol should be displayed with a currency amount
 
Method Summary
 CurrencyRate getBlockRate(java.util.Date date, Currency.BlockDateMatch match)
          Gets the exchange rate between this currency and its block master at the given date, returning null if not a member of a block.
 java.lang.String getCode()
          Gets the code of the currency
 int getDecimals()
          Gets the number of decimal places that should be used when displaying amounts in the currency
 char getDecimalSeparator()
          Gets the decimal separator character
 java.lang.String getDescription()
          Gets the description of the currency
 Currency.NegativeDisplay getNegativeDisplay()
          Gets the negative amount display format of the currency
 java.lang.String getSymbol()
          Gets the currency symbol for the currency
 Currency.SymbolDisplay getSymbolDisplay()
          Gets the currency symbol display format for the currency
 char getThousandSeparator()
          Gets the thousand separator character
 boolean isBlockCombinationWith(java.lang.String other, java.util.Date date, Currency.BlockDateMatch match)
          Determines if this currency is in the same block as the specified currency at the specified date
 boolean isBlockMaster(java.util.Date date, Currency.BlockDateMatch match)
          Determines if the currency is a block master currency at the given date The value returned reflects the state of the underlying data when the call is made, not when the Currency object was constructed.
 

Method Detail

getBlockRate

CurrencyRate getBlockRate(java.util.Date date,
                          Currency.BlockDateMatch match)
Gets the exchange rate between this currency and its block master at the given date, returning null if not a member of a block.
The data returned reflects the state of the underlying data when the call is made, not when the Currency object was constructed.

Parameters:
date - the date for which the rate should be found
match - how the date should be used
Returns:
a CurrencyRate object for the specified rate

getCode

java.lang.String getCode()
Gets the code of the currency

Returns:
the code of the currency

getDecimals

int getDecimals()
Gets the number of decimal places that should be used when displaying amounts in the currency

Returns:
the number of decimal places that should be used when displaying amounts in the currency

getDecimalSeparator

char getDecimalSeparator()
Gets the decimal separator character

Returns:
the decimal separator character

getDescription

java.lang.String getDescription()
Gets the description of the currency

Returns:
the description of the currency

getNegativeDisplay

Currency.NegativeDisplay getNegativeDisplay()
Gets the negative amount display format of the currency

Returns:
the negative amount display format of the currency

getSymbol

java.lang.String getSymbol()
Gets the currency symbol for the currency

Returns:
the currency symbol for the currency

getSymbolDisplay

Currency.SymbolDisplay getSymbolDisplay()
Gets the currency symbol display format for the currency

Returns:
the currency symbol display format for the currency

getThousandSeparator

char getThousandSeparator()
Gets the thousand separator character

Returns:
the thousand separator character

isBlockCombinationWith

boolean isBlockCombinationWith(java.lang.String other,
                               java.util.Date date,
                               Currency.BlockDateMatch match)
Determines if this currency is in the same block as the specified currency at the specified date

Parameters:
other - the other currency
date - the date to which the check should be applied
match - a Currency.BlockDateMatch explaining how to do the matching
Returns:
true if, and only if, this currency is in the same block as the specified currency at the specified date

isBlockMaster

boolean isBlockMaster(java.util.Date date,
                      Currency.BlockDateMatch match)
Determines if the currency is a block master currency at the given date The value returned reflects the state of the underlying data when the call is made, not when the Currency object was constructed.

Parameters:
date - the date for which the check should be made
match - specifies how the date should be used in deciding if the currency is a block master currency
Returns:
true if the currency is a block master at that date, false if it is not


Copyright © 2011 Sage Software, Inc. All rights reserved.