psdi.app.failure

Class FailureList

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


    public class FailureList
    extends Mbo
    implements FailureListRemote
    MBO to represent a failure hierarchy. See failure package description for detail.

    This is a organization level object.

    The key attributes for this object are OrgID and FailureList.

    The attributes in this object are as follows:

    Attribute NameDescription
    FailureClassNon-persistent attribute used to interact with top level FailureCode.FailureCode through this failurelist object.
    FailureCodeIdentifier of the FailureCode for this failurelist.
    FailureListUnique identifier for the failure list.
    FLCDescriptionNon-persistent attribute used to interact with top level FailureCode's description through this failurelist object.
    OrgIdIdentifier of the organization for this failurelist.
    ParentParent failure list number.
    Type The type or level of this failure.
    • Field Detail

      • inDuplicate

        public boolean inDuplicate
        IJ12249 Flag used to prevent Field classes initValue() of FCLDESCRIPTION and FAILURECLASSS from executing when failurelist is being duplicated. This is because the initValue of these field classes require heavy performance execution.
    • Constructor Detail

      • FailureList

        public FailureList(MboSet ms)
                    throws MXException,
                           java.rmi.RemoteException
        The constructor for FailureList.
        Parameters:
        ms - the FailureList MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Sets defaults for a new failurelist object. If owned by another failurelist, the parent attribute is set to the owner's failurelist number.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • init

        public void init()
                  throws MXException
        Initailzation rountine. Failurelist attribute is always read-only.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        This method determines if a FailureList record may be deleted. A top level failure list node may not be deleted if it is referenced by a WorkOrder, Asset, or Location.LocOper FailureCode. Failure List nodes not a top level may not be deleted if they are part of an existing Failure Report.
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException - Thrown with "Failure" and one of the following: "NoDelWO", "NoDelAsset", "NoDelLoc", or "NoDelFR" depending on the reason why the failure list node may not be deleted.
        MXException
        java.rmi.RemoteException
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Undeletes this FailureList node, its FailureCode, and recursively the child nodes
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Deletes this Failure List Node and all its children. If the related FailureCode records no longer represent any Failure List Nodes, the FailureCode is deleted also.
        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:
        Determines if this node can be deleted.
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        Creates a duplicate failurelist hierarchy. Sets the failurecode of the new failurelist to the passed in String parameter.
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated failurelist set.
        Throws:
        MXApplicationException - FailureCodeAlreadyExist when the failure already exist.
        MXException
        java.rmi.RemoteException
      • copyFailureCodes

        public void copyFailureCodes(MboSetRemote failureListSet)
                              throws MXException,
                                     java.rmi.RemoteException
        Copies the passed failurecodes as children of current list.
        Specified by:
        copyFailureCodes in interface FailureListRemote
        Parameters:
        failureListSet - the failureListSet to be copied.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.failure.FailureList#copyFailureCodes(String failurecodetocopy[]).
      • checkFailureReport

        public boolean checkFailureReport(java.lang.String failureReportCode)
                                   throws MXException,
                                          java.rmi.RemoteException
        Checks if failurecode used in failurereport.
        Parameters:
        failureReportCode - the failurecode to be checked in failurereport.
        Returns:
        true if the failurecode used in failurereport, false if not.
        Throws:
        MXException
        java.rmi.RemoteException
      • checkFailureCode

        public boolean checkFailureCode(java.lang.String fCode)
                                 throws MXException,
                                        java.rmi.RemoteException
        Checks if this code is already exist in failurecode table.
        Parameters:
        failurecode - the failurecode to be checked.
        Returns:
        true if the code exist in the failurecode table, false if not.
        Throws:
        MXException
        java.rmi.RemoteException
      • isTop

        public boolean isTop()
                      throws MXException,
                             java.rmi.RemoteException
        Checks if this failure is the top level.
        Returns:
        true if the failure doesn't have a parent.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasChildren

        public boolean hasChildren()
                            throws MXException,
                                   java.rmi.RemoteException
        Checks if this failure has children.
        Returns:
        true if this failure has children.
        Throws:
        MXException
        java.rmi.RemoteException
      • hasParents

        public boolean hasParents()
                           throws MXException,
                                  java.rmi.RemoteException
        Checks whether this failure has any parents.
        Returns:
        true if this failure has parents.
        Throws:
        MXException
        java.rmi.RemoteException
      • getChildren

        public MboSetRemote getChildren()
                                 throws MXException,
                                        java.rmi.RemoteException
        Retrieves the child failures associated with this failure. Calling this method is the same as calling getMboSet(FailureListSetRemote.CHILDREN);
        Returns:
        this failure's child set.
        Throws:
        MXException
        java.rmi.RemoteException
      • getParents

        public MboSetRemote getParents()
                                throws MXException,
                                       java.rmi.RemoteException
        Retrieves the parent failure associated with this failure. Same as getMboSet(FailureListSetRemote.PARENT);
        Returns:
        this failure's parent set.
        Throws:
        MXException
        java.rmi.RemoteException
      • getTop

        public MboSetRemote getTop()
                            throws MXException,
                                   java.rmi.RemoteException
        Gets this failurelist's top level failurelist.
        Returns:
        this failure's top level parent.
        Throws:
        MXException
        java.rmi.RemoteException
      • getHierarchies

        public java.lang.String[] getHierarchies()
                                          throws MXException,
                                                 java.rmi.RemoteException
        Gets failure's hierarchy.
        Returns:
        failure's hierarchy arrary or null. Currently just return null.
        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 FAILURELIST to the target FAILURELIST.
        1. FAILURELIST
        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
      • getMboSet

        public MboSetRemote getMboSet(java.lang.String name)
                               throws MXException,
                                      java.rmi.RemoteException
        Overridden to support faux MboSets
        Specified by:
        getMboSet in interface MboRemote
        Overrides:
        getMboSet in class Mbo
        Parameters:
        name - The relationship provided to retrieve a related mboSet, usually using foreign keys. For example, "psdi.app.workorder.WOSetRemote.ASSET" is a relationship for the work order object to access the asset Set where "workorder.assetnum=asset.assetnum". The relationship can also be chained. Such as ASSET.ASSETSTATUS.
        Returns:
        The returned related set specified through the relationship.
        Throws:
        MXException - "A relationship called {0} does not exist for the {1} business object" exception will be thrown if the relationship was not found. "Unknown Object" exception will be thrown if the database object can not be found through the relationship.
        java.rmi.RemoteException
        See Also:
        Mbo.getMboSet(String)
      • isInDuplicate

        public boolean isInDuplicate()
                              throws MXException,
                                     java.rmi.RemoteException
        IJ12249:indicates if this failurelist record is in the duplicate process
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException