psdi.app.workorder

Class WOTaskRelation

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


    public class WOTaskRelation
    extends Mbo
    implements WOTaskRelationRemote, WorkPlanMbo
    Mbo to represent a WOTaskRelation object.
    This object is used to define a predecessor to successor relationship between two work order tasks. The tasks can be from any work order in the work order hierarchy.
    The Wonum and TaskId defines the sucessor work order task in the relationship.
    The PredWonum and PredTaskId define the predecessor work order task in the relationship.

    This Mbo is a site level object.

    The key attributes for this object are wonum, siteid and taskid.

    The attributes in this object are as follows:

    Attribute Name Description
    WOTASKRELATIONID The unique identifier for the record
    WONUM Identifies the Work Order
    ORGID Organization Identifier
    SITEID Site Identifier
    TASKID Identifies the successor task for the predessor task (Non Persistant field)
    PREDREFWONUM Identifies the wonum of the predessor work order
    PREDWONUM Identifies the predessor work order
    PREDTASKID Identifies the predessor task id
    • Constructor Detail

      • WOTaskRelation

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

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets Default value for some of the fields of the new WOTaskRelation. New WOTaskRelation can only be created by the work order object.

        WONUM defaults from the parent and set WONUM of parent to read only.

        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        JobPlan.componentAdded()
      • updateTotals

        public void updateTotals(MboRemote wo,
                                 boolean isGain)
                          throws MXException,
                                 java.rmi.RemoteException
        Updates the work order totals related to the work plan mbo.
        Specified by:
        updateTotals in interface WorkPlanMbo
        Parameters:
        wo - The work order Mbo to update.
        isGain - Is this a gain or loss for the work order.
        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 Wonum.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "wonum" or else nothing will be propagated.
        keyValue - The new value of wonum.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyPlan

        public void copyPlan(MboRemote source,
                             java.util.Map operWoLookup)
                      throws MXException,
                             java.rmi.RemoteException
        Used to fill in data when copying a JobPlan's JPTaskRelations to a WorkPlan's WOTaskRelations. Most of the data for the new WOTaskRelation row (the connection information) comes from the JobTask that is the owner; this JobTask is the successor; the new WOTaskRelation will connect it to its predecessor. The RelType and LeadLagHours come from the JPTaskRelation object.
        Parameters:
        source - the JPTaskRelation row being copied
        operWoLookup - a hashmap of the JobTasks in this JobPlan
        Throws:
        MXException
        java.rmi.RemoteException
      • copyPlan

        public void copyPlan(MboRemote source)
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from interface: WorkPlanMbo
        Used to fill in data when copying from Job Plan to Work Plan
        Specified by:
        copyPlan in interface WorkPlanMbo
        Parameters:
        source - The JobPlan Mbo to copy from.
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        Overrides the skipCopyField() in the Mbo. Since this method takes the MboValueInfo as its parameter, just check to see if specified field needs to be copied or not. Return true if this field does not need to be copied. The following is a list of fields that are not copied from the source WOTaskRelation to the target WOTaskRelation.
        1. WONUM
        Overrides:
        skipCopyField in class Mbo
        Parameters:
        The - MboValueInfo object of the MboValue that needs to be copied.
        Returns:
        True if the field does not need to be copied, otherwise return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Description copied from class: Mbo
        Save the object and other linked objects. Subclasses can code their save() logic to include any appropriate updates to other linked objects and call super.save().
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException