com.ibm.openpages.api.resource

Interface ICurrencyField

  • All Superinterfaces:
    IField


    public interface ICurrencyField
    extends IField

    Represents a currency field. Only the local currency, local amount and exchange rate values can be set. Base amount and base currency (code) are read-only.

    Null currency values

    If you wish to set the value of this currency field to be "null" you can set the local currency and local amount values to null using the relevant setters, this results in the currency being treated as null by the system.

    Note you must always call setLocalAmount(Double) before calling setLocalCurrency(ICurrency) if setting the values to null.

    • Method Detail

      • getBaseAmount

        java.lang.Double getBaseAmount()
        Returns the currency base amount. The base amount is a computed value (local amount * exchange rate). Changing the local amount doesn't automatically recompute this value. The object needs to be saved for this value to be recomputed.
        Returns:
        the currency base amount
      • getExchangeRate

        java.lang.Double getExchangeRate()
        Returns the exchange rate.
        Returns:
        the exchange rate
      • getBaseCurrency

        ICurrency getBaseCurrency()
        Returns the base currency.
        Returns:
        the base currency
      • getLocalAmount

        java.lang.Double getLocalAmount()
        Returns the local amount.
        Returns:
        the local amount
      • getLocalCurrency

        ICurrency getLocalCurrency()
        Returns the local currency.
        Returns:
        the local currency
      • setLocalAmount

        void setLocalAmount(java.lang.Double localAmount)
        Sets the local amount. Can be set to null. See also setLocalCurrency(ICurrency) if desire to set both local amount and local currency to null the local amount needs to be set to null first.
        Parameters:
        localAmount - the local amount
      • setLocalCurrency

        void setLocalCurrency(ICurrency currency)
        Sets the local currency. Local currency may not be set to null when there is a non-null local amount.
        Parameters:
        currency - the local currency
      • setExchangeRate

        void setExchangeRate(java.lang.Double exchangeRate)
        Sets the exchange rate.
        Parameters:
        exchangeRate - exchange rate

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2022. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.