psdi.app.masterpm

Class MasterPM

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


    public class MasterPM
    extends Mbo
    implements MasterPMRemote
    MBO to represent MasterPM. See the MasterPM package description for details.

    This is a system level object.

    The key attributes for this object is MasterPMNum.

    The attributes in this object are as follows:

    Attribute NameDescription
    AdjNextDueA boolean flag that indicates whether the extdate will be used for calculating the next due date for the generation of workorders.
    AlertLeadAcceptable period (in days), prior to the PM due date, during which the PM may be performed.
    ApplyMPMToAssetA boolean field that indicates whether to list the asset when creating the associated PM's from this MasterPM.
    ApplyMPMToLocA boolean field that indicates whether to list the location that is associated with the item when creating the associated PM's from this MasterPM or not.
    ChangeBy, ChangeDate The name of the person who last modified the form and the date on which the form was last modified.
    DescriptionDescription of the MasterPM.
    Description_LongdescriptionNon-persistent attribute that specifies the Long description of the MasterPM.
    ExtDateIdentifier of the date that overrides the PM's usual next due date for generating PM work orders. This date only applies to the current PM record; it does not apply to other PMs in a PM hierarchy. If the PM has an extension date, MAXIMO ignores the dates in the Active Season fields. MAXIMO always clears the Extended Date and Adjust Next Due Date fields after you generate work orders from this PM. If there is a value in this field, the Adjust Next Due Date? field is required. If there is no value in this field, the Adjust Next Due Date field is NULL and readonly.
    FrequencyIdentifies the number of time units to elapse between the workorders generated from PM. The time units can be Days,Weeks, Months or Years.
    FreqUnitThe time units for the frequency attribute.
    FridayA boolean field that indicates whether friday is active work day.
    InterruptibleA boolean field that indicates whether work orders generated by this PM can be interrupted or not when they are in progress. This information will be copied from the first jobplan in the sequence on this PM.
    ItemnumUnique identifier for this piece of rotating item.
    ItemSetItemSetIDIdentifier of the itemset identifier for this object.
    LDKeyLong Description Key. This is a link to text stored in the LongDescription table.
    LeadTimeIdentifies the number of days in advance of the next due date when this PM generates the work orders.
    LeadTimeActiveNon-persistent attribute that specifies whether LeadTime can be applied to PM for generating the work orders.
    ItemnumIdentifies the Item number of the Rotating Item associated with master PM.
    NextDateThe date on which the next work order will be generated by this PM.
    MasterPMNumIdentifier for the MasterPM record.
    MasterPMIdUnique Identifier for the MasterPM record.
    MondayA boolean field that indicates whether it is a active work day.
    Prioritytd>Identifies the priority level used by the system when scheduling the work orders generated from this PM. If the priority in the MASTERPM table is NULL then the priority in the PM table should be based on the PM's Asset/Location.
    SeasonEndDayThe end day of active season for a PM.
    SaturdayA boolean field that indicates whether it is a active work day.
    SundayA boolean field that indicates whether it is a active work day.
    ThursdayA boolean field that indicates whether it is a active work day.
    TuesdayA boolean field that indicates whether it is a active work day.
    UpdExtDateA boolean field that indicates whether the Master PM updates extended date and adjust next due date fields on the associated PM records or not.
    UpdSeasonalDatesA boolean field that indicates whether the Master PM updates seasonal date fields (start month, start day, end month and end day) on the associated PM records or not.
    UpdTimeBasedFreqA boolean field that indicates whether the Master PM updates the time based fields on the associated PM records or not.
    UseFrequencyA boolean field that indicates whether this PM has frequency criteria to decide the next work order generation date.
    UseTargetDateA boolean field that indicates which date begins the PM Frequency Count. If this is set to 'True', the measurement of time between the work order generation from thisPM will begin at 'LastStartDate'. If this is 'false',the measurement will begin at 'LastCompDate'.
    WednesdayA boolean field that indicates whether it is a active work day.
    WorkTypeType of the work order that will be generated from a PM.
    WoStatusThe status of the work orders generated by the PM.

    • Constructor Detail

      • MasterPM

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

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets default values for a new MasterPM object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Method that checks whether a MasterPM can be deleted or not.
        PM can only be deleted if it is not refrenced in the PM objects
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException - when a PM has a refernece to the MasterPM
        java.rmi.RemoteException
      • delete

        public void delete(long modifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes a MasterPM record.
        when a Masterpm is deleted, all records in MASTERPMMETER AND MASTERPMSEQUENCE will also be deleted for that MASTERPMNUM
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        modifier - access modifier
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.delete(long)
      • 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 Purchase order 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 overrided the Mbo.modify() method.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        This method will be called just before save() in order to make sure it is a valid MASTERPM record.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException - If there is any error while coping to masterpmseq
        java.rmi.RemoteException
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        This method creates a duplicate record for MasterPM and related objects (MasterPMMeter, MasterPMSequence, MasterPMSeasons). The duplicated MasterPM's masterpmnum will be an autokeyed value or blank if the autokey is switched "off".
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        MboRemote The newly duplicated PM
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method overrides the skipCopyField() in the Mbo. This method takes the MboValueInfo as its parameter to see if this field needs to be copied or skipped.If this field does not need to be copied, it returns true. The following fields donot get copied from thesource MasterPM to the target MasterPM.
        • masterpmnum
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        mvi - The MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True,if the field does not need to be copied.In all other cases return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • setupPMFromMaster

        public void setupPMFromMaster(MboRemote pmMbo)
                               throws MXException,
                                      java.rmi.RemoteException
        Copy values from master PM to new PM.
        Specified by:
        setupPMFromMaster in interface MasterPMRemote
        Parameters:
        pmMbo - The PM from where the values are copied.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.masterpm.PM#setupPMFromMaster(MboRemote pmMbo)
      • updateAssociatedPMs

        public void updateAssociatedPMs(MboSetRemote siteSet)
                                 throws MXException,
                                        java.rmi.RemoteException
        Following attributes of the associated PM's are updated/copied from Master PM if 'overridemasterupd' of associated PMs is set to false.

        if'updtimebasedfreq' of Master PM is set to true, 'frequency' and 'frequnit' are copied from Master PM to associated PM.
        if'updmeterbasedfreq' of Master PMMeter is set to true, 'meterfrequency' info is copied from Master PMMeter to associated PMMeter.
        if'updseasonaldates' of Master PM is set to true, MasterPM Seasons is copied from Master PM to associated PM's PMSeasons
        if'updextdate' of Master PM is set to true, 'extdate' and 'adjnextdue' is copied from Master PM to associated PM.
        if'updjpsequence' of Master PM is set to true, the jobplan sequence of the Master PM is copied to associated PM.
        Specified by:
        updateAssociatedPMs in interface MasterPMRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MasterPM.updateAssociatedPMs(MboSetRemote siteSet)
      • validateTimeBasedFreq

        public void validateTimeBasedFreq(double frequency)
                                   throws MXException,
                                          java.rmi.RemoteException
        Validate time based frequency based on the frequncy units provided
        Throws:
        MXException
        java.rmi.RemoteException
      • plusCUpdateAssociatedPMs

        public void plusCUpdateAssociatedPMs(MboSetRemote siteSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        Add a new register to PLUSCPMEXTDATE table before the core updateAssociatedPMs process is called.
        Specified by:
        plusCUpdateAssociatedPMs in interface MasterPMRemote
        Parameters:
        siteSet -
        Throws:
        MXException
        java.rmi.RemoteException
      • plusCGetAssociatedPMs

        public java.util.HashSet plusCGetAssociatedPMs(MboSetRemote siteSet)
                                                throws MXException,
                                                       java.rmi.RemoteException
        Gets all Pms associated to the current MasterPM.
        Parameters:
        siteSet -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • mockItemNum

        public void mockItemNum(boolean enableMocking)
        Enables this mbo to say that its "itemnum" value is never null. The current scenario where it might take over is from its isNull(String attributeName) method
        Parameters:
        enableMocking - Flag to enable/disable such a feature
        See Also:
        psdi.plust.app.plusttmplt.virtual.PlusTPreviewGenAssetSet
      • isNull

        public boolean isNull(java.lang.String attributeName)
                       throws MXException,
                              java.rmi.RemoteException
        Description copied from class: Mbo
        Determines whether the attribute value identified by name within the current object is null. In order to handle the condition where the passed attributeName contains a . notation(for example, ASSET.DESCRIPTION when the current object is WorkOrder ), this method first gets the correct object and then checks if the attribute is null or not. If the attributeName does not contain a ".", the current object is assumed to be the one to retrieve information from.
        Specified by:
        isNull in interface MboRemote
        Overrides:
        isNull in class Mbo
        Parameters:
        attributeName - The attribute name within the current object.
        Returns:
        true if the attribute is currently null;false otherwise.
        Throws:
        MXException - "Attribute {0} does not exist" exception will be thrown if the attribute does not exist in the object.
        java.rmi.RemoteException
        See Also:
        Mbo.isNull(String)
      • isValidJPRevNum

        public boolean isValidJPRevNum(java.lang.String jpNum,
                                       java.lang.String revNum)
                                throws MXException,
                                       java.rmi.RemoteException
        Checks if the jobplan is in a compatible status.
        Parameters:
        jpNum -
        revNum -
        Throws:
        MXException
        java.rmi.RemoteException