psdi.app.safety

Class TagOut

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


    public class TagOut
    extends Mbo
    implements TagOutRemote
    Mbo object to represent TagOut. Tagouts are related to hazards via the SafetyLexicon object. The method tagoutsMustBelongToHazards indicates whether or not tagouts must be grouped under a hazard (true = tagouts must belong to hazards).

    See Safety Package description.

    This object includes non-persistent attributes.

    This is a site level object.

    The key attributes for this object are SiteID and TagOutID.

    The attributes in this object are as follows:

    Attribute NameDescription
    AssetDescriptionNon-persistent attribute. If AssetNum or Location is not null, this equals the description of the asset or location.
    DescriptionFreeform description. Also accommodates a long description.
    AssetNumAsset number to be tagged out. Foreign key to Asset.
    Either AssetNum or Location may be specified (not both).
    LocationLocation to be tagged out. Foreign key to Location.
    Either AssetNum or Location may be specified (not both).
    OrgIDThe organization for this site, stored on this table for ease of access. This equals the value for OrgID specified on the Site table.
    RequiredStateIdentifies the condition of the asset when tagged out.
    SiteIDThe site to which this record pertains. Foreign key to Site.
    TagOutIDUnique identifier for this object, within site.
    • 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 field defaults for a new Asset 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
        Description copied from class: Mbo
        Can the object be deleted ? This is object specific and should be overridden.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        Mark the object to be deleted depending on the access modifier. This will usually be overridden in the subclass of Mbo as there may be application specific rules as to if and when an object can be deleted. Object is not actually deleted in the database until save() is called. This method will also mark all associated Long Description and Translation Mbos for deletion.
        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:
        Mbo.delete(long)
      • 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
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        If assetnum and location are both null, then throw error MustSpecifyAssetnumOrLocation. If toBeAdded and no row in SafetyLexicon, then add one.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • associateLockOutToTagOut

        public MboSetRemote associateLockOutToTagOut(java.util.Vector lovector,
                                                     MboSetRemote tlset)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Given tagout and lockout, create taglock. This method will throw an error if the taglock already exists.
        Parameters:
        lovector - Vector of String representing lockoutid(s) that you wish to associate with this TagOut. The lockout mbo need not exist for this lockoutid. If the lockout mbo does not exist, this method will create the lockout mbo.
        tlset - Set of TagLock to which new mbo(s) will be added. Can be passed in as null.
        Returns:
        The full TagLock set, including the new mbo(s).
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        TagOut.taglockAlreadyExists(psdi.mbo.MboSetRemote, long)
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Creates a duplicate TagOut with its related objects.
        The duplicated TagOut's TagOutid will be an autokeyed value or just leave it blank if the autokey is off.
        The related objects being duplicated include the linked documents(Doclinks object), related LockOut and TagLock.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated MboRemote TagOut
        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 TagOut to the target TagOut.
          TAGOUTID
        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:
        java.rmi.RemoteException
        MXException