psdi.app.inventory

Class Conversion

  • java.lang.Object
  • All Implemented Interfaces:
    java.rmi.Remote, ConversionRemote, MboConstants, MboRemote, MaxRemoteProxy


    public class Conversion
    extends Mbo
    implements ConversionRemote
    Mbo object to represent the Conversion object.

    See Inventory Package description.

    This is an itemset-level object.

    The key attributes for this object are as follows: FromMeasureUnit, ToMeasureUnit, ItemNum, and ItemSetID.

    The attributes in this object are as follows:

    Attribute NameDescription
    ConversionFactor used to convert the "from" measure units to the "to" measure units.
    FromMeasureUnitThe measure unit to be converted from.
    ToMeasureUnitThe measure unit to be converted to.
    ItemnumUnique item identifier.
    ItemSetIDIdentifier of the itemset identifier for the current organization.
    ChangeBy, ChangeDateName of the user who last modified this object and the date of last change.
    • Constructor Detail

      • Conversion

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Set default values for some of the fields of the conversion Mbo. The table below shows the default values for each of the attributes listed.
        Attribute NameAttribute Value
        changebyCurrent username
        changedateCurrent date
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Called whenever a change is made to the attributes of a MBO. The programmer should override if interested in intercepting this event. An example of the use of this is to set the changeby/changedate of a conversion whenever one of the attributes is set. If an MXException is thrown from this routine, the change of value is rolled back, this provides a mechanism to abort any changes. Default behavior is to do nothing. This method has overridden the Mbo.modify() method.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Checks whether the direct or inverse conversion factor already exists for the entered measure units, and itemnum.
        Overrides:
        appValidate in class Mbo
        Throws:
        conversionAlreadyExists - thrown if a direct ("from" to "to" conversion factor exists
        inverseConversionExists - thrown if an inverse ("to" to "from") conversion factor exists
        MXException
        java.rmi.RemoteException