psdi.app.mr

Class MRStatus

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


    public class MRStatus
    extends Mbo
    implements MRStatusRemote
    MBO object to represent an MRStatus. Every time a status change is done on an MR, a new MRStatus record is added to the database. Hence, the MRStatus table in the database will contain a history of all status changes that were done on a particular MR object.

    See Material Requisition Package description.

    This is a site level object.

    The key attributes for this object are SiteID and MRStatusSeq.

    The attributes in this object are as follows:

    Attribute Name Attribute Value
    ChangeBy, ChangeDate Got from the UserInfo object; copied from the StatusDate of the owner MR.
    MemoStatus change notes.
    MRNum MRNum to which this MRStatus belongs.
    MRStatusSeq Unique status sequence number.
    OrgIDIdentifier of the organization for this MR status.
    SiteIDIdentifier of the site for this MR status.
    Status MR's Status to which this MRStatus belongs.
    • Constructor Detail

      • MRStatus

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

      • init

        public void init()
                  throws MXException
        Init method called by Architecture. Set the MRStatus Mbo to READONLY so that no one can modify it.
        Overrides:
        init in class Mbo
        Throws:
        MXException.
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new MRStatus Record. Required fields of the MRStatus are initialised in this method.
        The following fields are initialised with their respective values.


        Attribute Name Attribute Value
        MRStatusSeq Unique Id
        MRNum MRNum to which this MRStatus belongs
        Status MR's Status to which this MRStatus belongs.
        ChangeDate Copied from the StatusDate of the Owner MR
        ChangeBy Got from the UserInfo Object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException - thrown if a new status record cannot be added
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        An MRStatus object cannot be deleted. An exception is thrown if anybody tries to delete() an MRStatus record.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException("mr", - "deletestatus") thrown when a status record cannot be deleted
        java.rmi.RemoteException
        MXException
      • getMRStatusRecord

        public java.util.Vector getMRStatusRecord()
                                           throws MXException,
                                                  java.rmi.RemoteException
        Gets historical data from MRStatus.
        Returns:
        Vector Consists of MRStatus.changedate, MRStatus.memo, MRStatus.status, MRStatus.changeby, "DESKREQ", MRStatus.mrnum, "".
        Throws:
        MXException
        java.rmi.RemoteException