psdi.app.asset

Class SparePart

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


    public class SparePart
    extends Mbo
    implements SparePartRemote
    MBO object to represent all replaceable spare's in an asset that can be stored in an inventory. See Asset package description for details.

    This is a site level object.

    The key attributes for this object are as follows: SiteId, Assetnum, Itemnum, ItemSetID.

    The attributes in this object are as follows:

    Attribute NameDescription
    DescriptionFreeform description. Also accommodates a long description.
    AssetNumAsset Number. One of the keys for this object.
    ItemNumSpare part item number. One of the keys for this object.
    LDKeyKey to long description.
    OrgIdIdentifier of the organization for this spare part.
    QuantityQuantity needed for this piece of asset specified by Assetnum.
    SiteIdIdentifier of the site for this spare part.
    See Also:
    Item, Asset
    • Constructor Detail

      • SparePart

        public SparePart(MboSet ms)
                  throws MXException,
                         java.rmi.RemoteException
        Construct the SparePart object
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialize the SparePart object.
         
        Overrides:
        init in class Mbo
        Parameters:
        none -
        Throws:
        none
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        adds a new SparePart object
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXApplicationException("asset","sparePartNoAdd") - if an object other than Asset attempts to add a new SparePart object
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        checks if this SparePart object can be deleted
        Overrides:
        canDelete in class Mbo
        Throws:
        MXApplicationException("asset","sparePartNoDelete") - if an object other than Asset attempts to delete this SparePart object
        MXException
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        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 not. 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 SparePart to the target SparePart.
        1. ASSETNUM
        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, otherwise return false.
        Throws:
        java.rmi.RemoteException
        MXException
      • propagateKeyValue

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

        public void deleteSparePart(long sparepartid)
                             throws MXException,
                                    java.rmi.RemoteException
        Deletes SparePart record for the given sparepartid.
        Parameters:
        sparepartid - The id of sparepart record.
        Throws:
        MXException
        java.rmi.RemoteException