psdi.app.workorder

Class WoHazardPrec

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


    public class WoHazardPrec
    extends Mbo
    implements WoHazardPrecRemote
    Mbo object to represent WoHazardPrec. Relates hazards and precautions for a workorder. The child woprecaution will have the same wosafetydatasource as the wohazardprec.

    See Work Order Safety Mbos Overview.

    This object includes non-persistent attributes.

    This is a site level object.

    The key attributes for this object are SiteID, WoNum, HazardID, PrecautionID, and WoSafetyDataSource.

    The attributes in this object are as follows:

    Attribute NameDescription
    DescriptionNon-persistent attribute. This equals the description of the woprecaution.
    HazardIDForeign key to WoHazard.
    OrgIDThe organization for this site, stored on this table for ease of access. This equals the value for OrgID specified on the Site table.
    PrecautionIDForeign key to WoPrecaution.
    SiteIDThe site to which this record pertains. Foreign key to Site.
    WoNumForeign key to Workorder.
    WoSafetyDataSourceSee Work Order Safety Mbos Overview.
    Extra Fields PREC01 thru PREC10Non-persistent attributes. Same as extra fields on WoPrecaution.
    • Constructor Detail

      • WoHazardPrec

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

      • init

        public void init()
                  throws MXException
        Owner must be workorder, wohazard, wosafetylink or woprecaution.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add a mbo, defaulting the attributes shown below. The owner can be Workorder, WoHazard, WoSafetyLink, or WoPrecaution
        Attribute NameAttribute Value
        HazardIDIf owner is WoHazard or WoSafetyLink, equals the owner's HazardID. If owner is WoPrecaution, equals the owner's owner's HazardID.
        PrecautionIDIf owner is WoPrecaution, equals the owner's PrecautionID.
        WoNumOwner's WoNum
        WoSafetyDataSourceIf owner is WoHazard or WoSafetyLink, equals the owner's WoSafetyDataSource.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deleting WoHazardPrec may cascade to WoPrecaution.
        Specified by:
        delete in interface MboRemote
        Overrides:
        delete in class Mbo
        Parameters:
        accessModifier - The bitwise flag specified to determine if certain normal security checks are to be bypassed for this delete request. For example: if the accessModifer is NOACCESSCHECK, then the check for the object's NODELETE flag and the call to the object's canDelete() method will not be performed. If the accessModifer is NONE, then all the access checks are performed before this object is marked delete.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        WoHazardPrecSet.shouldCascadeDeletePrecaution(psdi.app.workorder.WoHazardPrec)
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Description copied from class: Mbo
        Unmark the Mbo for deletion. Can only be called after a delete() and before the save() has been performed. This method will also unmark associated Long Description and Translation Mbos.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method overrides the skipCopyField() in the Mbo.Since this method takes the MboValueInfo as its parameter just check to see if this field needs to be copied or skipped.If this field does not need to be copied return true. The following is a list of fields that are not copied from the source WOHAZARDPREC to the target WOHAZARDPREC.
        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.In all other cases return false.
        Throws:
        MXException
        java.rmi.RemoteException