psdi.app.workorder

Class MultiAssetLocCI

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


    public class MultiAssetLocCI
    extends Mbo
    implements MultiAssetLocCIRemote
    Mbo object to represent MultiAssetLocCI. See the Work order package description for details.

    This is a site level object.

    There are no key attributes for this object.

    The attributes in this object are as follows:

    Identifier of the Asset
    Identifier of the Location
    Identifier of the Configuration Iterm
    ADHOC Identifier of the Ticket
    PROGRESS Progress of the work
    SEQUENCE Sequence
    ISPRIMARY Is Primary Asset
    CLASS Type of the ticket
    WONUM Unique Identifier
    ORGID Constraint Identifier of the organization
    SITEID Unique Identifier of the Site
    WORKORGID Constraint Identifier of the work organization
    WORKSITEID Unique Identifier of the work Site

    • Constructor Detail

      • MultiAssetLocCI

        public MultiAssetLocCI(MboSet ms)
                        throws MXException,
                               java.rmi.RemoteException
        Construct the WOAssetsPlan object
        Throws:
        MXException
        java.rmi.RemoteException
    • 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
        Description copied from class: Mbo
        This is called when a new Mbo is added to the Mboset collection. It is called AFTER user defaults have been set from the data dictionary. Programmer should usually override this to set some defaults. Default behavior is to do nothing.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • getLocForAsset

        public void getLocForAsset()
                            throws MXException,
                                   java.rmi.RemoteException
        Called by the assetnum attribute to set the MultiAssetLocCI's location to the Asset's location If the asset has a valid location for the MultiAssetLocCI, that location will be put on the MultiAssetLocCI, if the location field is blank. If the MultiAssetLocCI's locaiton is not blank, a warning will be given (MXApplicationException, workorder, AssetChangeLoc, parameter of the asset's location), but the location field won't change.
        Throws:
        MXException
        java.rmi.RemoteException
      • getCIForAsset

        public void getCIForAsset()
                           throws MXException,
                                  java.rmi.RemoteException
        Called by the assetnum attribute to set the MultiAssetLocCI's CINum to the CIt's Asset If the asset has a Valid CI for the MultiAssetLocCI, that CI will be put on the MultiAssetLocCI, if the CI field is blank. If the MultiAssetLocCI's cinum is not blank, a warning will be given (MXApplicationException, workorder, AssetChangeLoc, parameter of the asset's CI).
        Throws:
        MXException
        java.rmi.RemoteException
      • getAssetForCI

        public void getAssetForCI()
                           throws MXException,
                                  java.rmi.RemoteException
        Called by the cinum attribute to set the MultiAssetLocCI's asset to the CI's asset If the CI has a valid asset for the MultiAssetLocCI, that asset will be put on the MultiAssetLocCI, if the asset field is blank. If the MultiAssetLocCI's asset is not blank, a warning will be given (MXApplicationException, workorder, AssetChangeLoc, parameter of the CI's asset), but the asset field won't change.
        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 MULTIASSETLOCCI to the target MULTIASSETLOCCI.
        1. RecordKey
        2. RecordClass
        3. WorkOrgId
        4. WorkSiteId
        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
      • propagateKeyValue

        public void propagateKeyValue(java.lang.String keyName,
                                      java.lang.String keyValue)
                               throws MXException,
                                      java.rmi.RemoteException
        Set value for Wonum or ticketid.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should equal "wonum" or ticketid, else nothing will be propagated.
        keyValue - The new value of wonum or ticketid
        Throws:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Can not be delete when primary record when fields in owner wo is not cleared - apar IV63019
        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
        check if the row is valid.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isChangeByUserWhenSetFromLookup

        public boolean isChangeByUserWhenSetFromLookup(java.lang.String lookupAttrName,
                                                       java.lang.String attributeName)
        Indicates whether the CHANGEDBY_USER flag should be set for attributes on this Mbo when their values are set (along with other key fields) via lookup.
        Overrides:
        isChangeByUserWhenSetFromLookup in class Mbo
        Parameters:
        lookupAttrName - the attribute whose lookup is being called.
        attributeName - the attribute that is not the lookup attribute.
        Returns:
      • applyToAllUser

        public void applyToAllUser(MboRemote currentUserCust)
                            throws java.rmi.RemoteException,
                                   MXException
        This method will apply the specified user and custodian to WOAssetUserCust and WOLocUserCust
        Specified by:
        applyToAllUser in interface MultiAssetLocCIRemote
        Parameters:
        currentUserCust - the modify user and custodian will apply to WOAssetUserCust and WOLocUserCust
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        psdi.app.workorder.MultiAssetLocCI#applyToAllUser()
      • findAssetMboForReplacement

        public MboRemote findAssetMboForReplacement()
                                             throws MXException,
                                                    java.rmi.RemoteException
        IV75060: The current multiassetlocci is the replacement asset. Find the multiassetlocci that has this replacement asset(entered as replaceassetnum). This.assetnum = theOtherMulti.replaceassetnum
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • findReplaceAssetMbo

        public MboRemote findReplaceAssetMbo()
                                      throws MXException,
                                             java.rmi.RemoteException
        IV75060: this multiassetlocci is the asset that contains the replacement asset. Find the replacement asset. this.replaceassetnum=theothermulti.assetnum.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions which occur when a MultiAssetLocCI mbo is saved. If an inspection form exists, an inspection result must be created.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException