psdi.app.labor

Class LaborQual

    • Constructor Detail

      • LaborQual

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Default certain fields depending on whether owner is a Labor or a Qual.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for LaborCode.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "laborcode" or else nothing will be propagated.
        keyValue - The new value of laborcode.
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        On save, check to see if qualification already exists for this labor.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • calculateEndDate

        public java.util.Date calculateEndDate(java.util.Date inDate)
                                        throws MXException,
                                               java.rmi.RemoteException
        Calculates the expiration date based on the effective date of a laborqual and the duration and period of the labor's qualification.
        Specified by:
        calculateEndDate in interface LaborQualRemote
        Returns:
        Date The calculated end date.
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        After a LaborQual is saved to a Labor, it cannot be deleted.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Return a status handler with the help of which the laborqual status changes can be done.
        Specified by:
        getStatusHandler in class StatefulMbo
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Return the laborqualstatus object. Required for statefullness.
        Specified by:
        getStatusHistory in class StatefulMbo
        Returns:
        The set of LABORQUALSTATUS records
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        public void changeStatus(java.lang.String newStatus,
                                 java.util.Date date,
                                 java.lang.String memo)
                          throws MXException,
                                 java.rmi.RemoteException
        Change status.
        Specified by:
        changeStatus in interface StatefulMboRemote
        Overrides:
        changeStatus in class StatefulMbo
        Parameters:
        newStatus - The new desired status. This is the translated status (that is, the status code as it would have been entered by a user, or valuelist.value), not the internal status value (valuelist.maxvalue).
        date - The effective date of the new status (java.util.Date).
        memo - A string briefly describing the circumstances of the change. The memo can be null.
        Throws:
        MXException - Thrown if there is a problem, or the status cannot be changed, as determined by canChangeStatus(String).
        java.rmi.RemoteException
        See Also:
        StatefulMbo.changeStatus(String,java.util.Date,String,long)
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Write to the LaborCertHist table and then do super.save().
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException