psdi.app.safety

Class SPLexiconLink

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


    public class SPLexiconLink
    extends Mbo
    implements SPLexiconLinkRemote
    Mbo object to represent SPLexiconLink.

    See Safety Package description.

    This object includes non-persistent attributes.

    This is a site level object.

    The key attributes for this object are SiteID, SPWorkAssetID and SafetyLexiconID.

    The attributes in this object are as follows:

    Attribute NameDescription
    ApplySeqSame as SafetyLexicon ApplySeq. This can specify the sequence in which TagOuts should be applied within a safety plan. See SafetyLexicon.
    AssetDescriptionIf SafetyLexicon TagoutID is null, this is the non-persistent attribute for the related asset (asset or location) on SafetyLexicon. If SafetyLexicon TagoutID is NOT null, this is the non-persistent attribute for the asset to be tagged out (asset or location) on TagOut.
    ContactRatingNon-persistent attribute, same as hazard contactrating. Pertains only to hazardous-material-enabled hazards.
    AssetNumNon-persistent attribute for "related asset," same as SafetyLexicon AssetNum. Supports SafetyPlan owning SPLexiconLink set, adding a new SPLexiconLink that points to the SafetyLexicon mbo with the assetnum specified by this value.
    FlammabilityRatingNon-persistent attribute, same as hazard flammabilityrating. Pertains only to hazardous-material-enabled hazards.
    HazardDescriptionNon-persistent attribute for the hazard.
    HazardIDNon-persistent attribute, same as SafetyLexicon HazardID. (Although on the Hazardous Materials UI this is labelled "Material.") Supports SafetyPlan owning SPLexiconLink set, adding a new SPLexiconLink that points to the SafetyLexicon mbo with the hazardid specified by this value.
    HealthRatingNon-persistent attribute, same as hazard healthrating. Pertains only to hazardous-material-enabled hazards.
    LocationNon-persistent attribute for "related location," same as SafetyLexicon Location. Supports SafetyPlan owning SPLexiconLink set, adding a new SPLexiconLink that points to the SafetyLexicon mbo with the location specified by this value.
    MsdsNumNon-persistent attribute, same as hazard Msdsnum. Pertains only to hazardous-material-enabled hazards.
    OrgIDThe organization for this site, stored on this table for ease of access. This equals the value for OrgID specified on the Site table.
    ReactivityRatingNon-persistent attribute, same as hazard reactivityrating. Pertains only to hazardous-material-enabled hazards.
    RemoveSeqSame as SafetyLexicon RemoveSeq. This can specify the sequence in which TagOuts should be removed within a safety plan. See SafetyLexicon.
    SafetyLexiconIDForeign key to SafetyLexicon.
    SiteIDThe site to which this record pertains. Foreign key to Site.
    SPWorkAssetIDForeign key to SPWorkAsset.
    TagoutDescriptionNon-persistent attribute for the tagout description on TagOut.
    TagoutAssetNumNon-persistent attribute for "tagout asset," same as Tagout AssetNum. Supports SPLexiconLink that points to a SafetyLexicon that has non-null tagoutid.
    TagoutIDNon-persistent attribute for the tagout ID. Will be null if this represents the owning hazard or the hazard is not tagout-enabled. Points to value on SafetyLexicon.
    TagoutLocationNon-persistent attribute for "tagout location," same as Tagout Location. Supports SPLexiconLink that points to a SafetyLexicon that has non-null tagoutid.
    WorkAssetDescriptionNon-persistent attribute for the work asset (asset or location) on SPWorkAsset.
    WorkAssetNon-persistent attribute for "work asset," same as SPWorkAsset WorkAsset. Supports adding a tagout-enabled hazard to a Safety Plan.
    WorkLocationNon-persistent attribute for "work location," same as SPWorkAsset WorkLocation. Supports adding a tagout-enabled hazard to a Safety Plan.
    • Constructor Detail

    • Method Detail

      • init

        public void init()
                  throws MXException,
                         java.lang.RuntimeException
        If not toBeAdded, set values for non-persistent attributes as follows.
        Attribute NameAttribute Value
        AssetDescriptionAsset description from SafetyLexicon.
        AssetNumAssetNum from SafetyLexicon
        HazardDescriptionDescription from Hazard.
        HazardIDHazardID from SafetyLexicon
        LocationLocation from SafetyLexicon
        TagoutAssetnumAssetnum from TagOut (if tagoutid is not null on safetylexicon).
        TagoutIDTagoutID from SafetyLexicon
        TagoutLocationLocation from TagOut (if tagoutid is not null on safetylexicon).
        WorkAssetDescriptionAsset description from SPWorkAsset.
        WorkAssetWorkAsset from SPWorkAsset
        WorkLocationWorkLocation from SPWorkAsset
        Overrides:
        init in class Mbo
        Throws:
        MXException
        java.lang.RuntimeException
        See Also:
        SPLexiconLink.attachNonPersistentListeners()
      • getValidateOrder

        public java.lang.String[] getValidateOrder()
        Validation Order for splexiconlink attributes.
        Overrides:
        getValidateOrder in class Mbo
      • 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 SPLEXICONLINK to the target SPLEXICONLINK.
        1. SPWORKASSETID
        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
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        If we added the same hazard to both ASSOCHAZPREC and ASSOCHAZMAT then remove one so we don't get a duplicate key error.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        If this is a tagout-enabled hazard, also 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:
        SPLexiconLink.checkTagouts(), SPLexiconLink.deletingSPWA(), SPLexiconLinkSetRemote.SPLLTAGOUTS