psdi.app.safety

Class SafetyLexicon

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


    public class SafetyLexicon
    extends Mbo
    implements SafetyLexiconRemote
    Mbo object to represent SafetyLexicon. This can be thought of as the central hub that identifies the interrelatedness of all the safety data.

    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 SafetyLexiconID.

    The attributes in this object are as follows:

    Attribute NameDescription
    ApplySeqIf TagOutID is not null, this can specify the sequence in which TagOuts should be applied within a safety plan.
    See SPLexiconLink.
    AssetDescriptionNon-persistent attribute. If AssetNum or Location is not null, this equals the description of the asset or location.
    AssetNumRelates a Hazard to a piece of asset. Foreign key to Asset.
    Either AssetNum or Location may be specified (not both). Both can be null.
    HazardIDForeign key to Hazard.
    LocationRelates a Hazard to a location. Foreign key to Location.
    Either AssetNum or Location may be specified (not both). Both can be null.
    OrgIDThe organization for this site, stored on this table for ease of access. This equals the value for OrgID specified on the Site table.
    RemoveSeqIf TagOutID is not null, this can specify the sequence in which TagOuts should be removed within a safety plan.
    See SPLexiconLink.
    SafetyLexiconIDUnique identifier for this object, within site.
    SiteIDThe site to which this record pertains. Foreign key to Site.
    TagOutIDRelates a TagOut to a Hazard and/or SafetyPlan. Foreign key to TagOut.
    See SPLexiconLink for the relation to SafetyPlan.
    • Constructor Detail

    • 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
        Add a mbo, defaulting the attributes shown below.
        Attribute NameAttribute Value
        SssetNumIf owner is Asset, equals the owner's AssetNum.
        HazardIDIf owner is Hazard, equals the owner's HazardID.
        LocationIf owner is Location, equals the owner's Location.
        SafetyLexiconIDgenerateUniqueID
        TagOutIDIf owner is TagOut, equals the owner's TagOutID.
        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
        If this is the main safetylexicon for a hazard, the its owner must be Hazard.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - Thrown with "safety", "CannotDeleteSafetyLex".
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete SpLexiconLink. If this is a hazard, delete its tagouts.
        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:
        getTagoutsToDeleteOrUndelete, deleteOrUndeleteTagoutsFromThisSet
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for HazardID or TagOutID.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - The attribute name.
        keyValue - The new value of the attribute.
        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 SAFETYLEXICON to the target SAFETYLEXICON.
          SAFETYLEXICONID HAZARDID
        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