psdi.app.currency

Class Currency

  • All Implemented Interfaces:
    java.rmi.Remote, CurrencyRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class Currency
    extends Mbo
    implements CurrencyRemote
    MBO object to represent Currency. The Currency object stores and maintains detailed information about the different currencies set to be used by the MAXIMO system.

    See Currency Package description.

    This is a system level object.

    The key attribute for this object is CurrencyCode.

    The attributes in this object are as follows:

    Attribute NameDescription
    ActiveIs the currency active, i.e. is it available to be used on purchase orders, purchase requisitions or invoices.
    ChangeBy, ChangeDateThe name or user ID of the person who last modified the record; the date when currency definition was last modified.
    CurrencyCodeCode used to identify the currency. Unique identifier of this object.
    DescriptionShort description of this currency code. Also accommodates a long description.
    LastUsedLast date on which a PO/Invoice with this currency was entered.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    • Constructor Detail

      • Currency

        public Currency(MboSet ms)
                 throws MXException,
                        java.rmi.RemoteException
        Construct the Currency object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new Currency record. Required fields of the Currency object are initialized. The table below shows the default values for each of the attributes listed. Attribute LastUsed is set to be read-only.
        Attribute Name Attribute Value
        Active Yes
        Changeby Current username
        Changedate Current date

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes this currency object. delete() overridden by Currency MBO. When a currency mbo is deleted it deletes all the corresponding Exchange mbos. (all Exchange mbos for the currency code).
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier -
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can the currency object be deleted? Checks for currency code reference in non-history PO, PR, Company, RFQVendor, Invoice, MatRecTrans, MatUseTrans, ServRecTrans or InvoiceTrans.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - (currency, DeleteCurrency) is thrown if the currency is referenced by PO, PR, Company, Invoice, RFQVendor, MatRecTrans, MatUseTrans, ServRecTrans or InvoiceTrans tables
        MXException
        java.rmi.RemoteException
      • getCurrencyCost

        public double getCurrencyCost(java.lang.String currencyCodeTo,
                                      double value,
                                      java.util.Date exchangeDate,
                                      java.lang.String orgId)
                               throws MXException,
                                      java.rmi.RemoteException
        Calculates the cost equivalent to the current mbo(currencyfrom) given any currency code. Called when a date is given to get the active exchange rate in calculating the cost.
        Specified by:
        getCurrencyCost in interface CurrencyRemote
        Parameters:
        exchangeDate - the exchange date to find the exchange rate
        currencyCodeTo - the currency code to be used to convert from the original currency code
        value - the value of currencycodeto that needs to be converted
        orgId - orgId associated with the currencyCodeTo
        Returns:
        converted currency cost
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Currency.getCurrencyCost(String, double, Date, String)