psdi.app.tool

Class ToolTransSet

    • Constructor Detail

      • ToolTransSet

        public ToolTransSet(MboServerInterface ms)
                     throws MXException,
                            java.rmi.RemoteException
        Construct the set
        Parameters:
        ms - Mbo server interface
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • getMboInstance

        protected Mbo getMboInstance(MboSet ms)
                              throws MXException,
                                     java.rmi.RemoteException
        Generate a new tooltrans object
        Specified by:
        getMboInstance in class MboSet
        Parameters:
        ms - Mbo object
        Returns:
        Mbo instance
        Throws:
        MXException
        java.rmi.RemoteException
      • setOwner

        public void setOwner(MboRemote mbo)
                      throws MXException,
                             java.rmi.RemoteException
        setOwner is overridden so the owner can be looked up in the attribute listeners and save method. Note that if setOwner is never called, the variables remain null
        Specified by:
        setOwner in interface MboSetRemote
        Overrides:
        setOwner in class MboSet
        Parameters:
        mbo - mbo object
        Throws:
        MXException
        java.rmi.RemoteException
      • setAllDates

        public void setAllDates(boolean allDatesActLab)
                         throws MXException,
                                java.rmi.RemoteException
        Set the userpref alldates setting.
        Specified by:
        setAllDates in interface ToolTransSetRemote
        Parameters:
        allDatesActLab - The userpref setting for alldates i.e. all the existing tool transactions.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.tool.ToolTransSet#setAllDates()
      • setStartDate

        public void setStartDate(java.util.Date startDateActLab)
                          throws MXException,
                                 java.rmi.RemoteException
        Set by the user. If clearing the start date pass null as parameter.
        Specified by:
        setStartDate in interface ToolTransSetRemote
        Parameters:
        startDateActLab - The start date to be set by the user.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.tool.ToolTransSet#setStartDate()
      • setEndDate

        public void setEndDate(java.util.Date endDateActLab)
                        throws MXException,
                               java.rmi.RemoteException
        Set by the user. If clearing the end date pass null as parameter.
        Specified by:
        setEndDate in interface ToolTransSetRemote
        Parameters:
        endDateActLab - The end date to be set by the user.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.tool.ToolTransSet#setEndDate()
      • getUserPrefWhere

        public java.lang.String getUserPrefWhere()
        Override the MboSet getUserPrefWhere() to return a userpref where clause which is appended to th existing whereClause. This is called by the framework to allow any app specific modifications to the whereClause.
        Overrides:
        getUserPrefWhere in class MboSet
        Throws:
        MXException - is caught.
        java.rmi.RemoteException - is caught.
      • addDates

        public java.util.Date addDates(java.util.Date date,
                                       int days)
        Add or minus days from the given date.
        Parameters:
        date - Given date
        days - days to be added
        Returns:
        date
      • canAdd

        public void canAdd()
                    throws MXException
        Determines if the work order can add tool transactions. If the set isn't owned by a work order, no exception is thrown.
        Overrides:
        canAdd in class MboSet
        Throws:
        MXApplicationException - Thrown with "workorder","ActualsAppr", param(wonum) if the work order owner is not approved.
        Thrown with "workorder", "WOHistory", param (wonum) if the work order is in history.
        MXException
      • remove

        public void remove(MboRemote mbo)
                    throws MXException,
                           java.rmi.RemoteException
        remove the child mbo need remove it from the childlookup. Also informs the listeners of the removal.
        Specified by:
        remove in interface MboSetRemote
        Overrides:
        remove in class MboSet
        Throws:
        MXException
        java.rmi.RemoteException