psdi.app.collection

Class CollectDetails

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


    public class CollectDetails
    extends Mbo
    implements CollectDetailsRemote
    MBO object to represent Collect Details. See Collections package description for details.

    This is a system level object.

    The key attributes for this object is: COLLECTIONNUM, ASSETNUM, LOCATION, SITEID and CINUM.

    The attributes in this object are as follows:

    Attribute NameDescription
    COLLECTDETAILSIDUnique ID
    COLLECTIONNUMIdentifier of the Collection.
    ASSETNUMIdentifier of the Asset that is part of the Collection.
    LOCATIONIdentifier of the Location that is part of the Collection.
    CINUMIdentifier of the CI that is part of the Collection.
    SITEIDIdentifier of the Asset's/Location's Site.
    ORGIDIdentifier of the Asset's/Location's Organization.
    • Constructor Detail

      • CollectDetails

        public CollectDetails(MboSet ms)
                       throws MXException,
                              java.rmi.RemoteException
        Constructs the CollectDetails object.

        Parameters:
        ms - MboSet
        Throws:
        none
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization routine.
        Overrides:
        init in class Mbo
        Parameters:
        none -
        Throws:
        none
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Adds a new CollectDetails object.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Parameters:
        none -
        Throws:
        none
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Every collect detail should be associated either with a ci or asset or location. All ci,asset and location cannot be null.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException - if cinum,assetnum or location are null, then MXApplicationException("collectdetails","selectciassetlocation")
        java.rmi.RemoteException
      • skipCopyField

        protected boolean skipCopyField(MboValueInfo mvi)
                                 throws java.rmi.RemoteException,
                                        MXException
        This method overrides the skipCopyField() in the Mbo. This method takes the MboValueInfo as its parameter to see if this field needs to be copied or skipped.If this field does not need to be copied, it returns true. The following fields donot get copied from the source CollectDetails to the target CollectDetails.
        1. collectionnum
        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:
        MXException
        java.rmi.RemoteException
      • propagateKeyValue

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

        public void checkForCIUniqueness(java.lang.String attr)
                                  throws MXException,
                                         java.rmi.RemoteException
        Make sure duplicate cinum is not added for the collectdetails
        Throws:
        MXApplicationException("collection","RecordExists",param) - when this CollectDetails' CINum attribute is a duplicate of another CINum in its set.
        MXException
        java.rmi.RemoteException
      • checkForAssetUniqueness

        public void checkForAssetUniqueness(java.lang.String attr)
                                     throws MXException,
                                            java.rmi.RemoteException
        Make sure duplicate assetnum is not added for the collectdetails
        Throws:
        MXApplicationException("collection","RecordExists",param) - when this CollectDetails' AssetNum attribute is a duplicate of another AssetNum in its set.
        MXException
        java.rmi.RemoteException
      • checkForLocationUniqueness

        public void checkForLocationUniqueness(java.lang.String attr)
                                        throws MXException,
                                               java.rmi.RemoteException
        Make sure duplicate location is not added for the collectdetails
        Throws:
        MXApplicationException("collection","RecordExists",param) - when this CollectDetails' Location attribute is a duplicate of another Location in its set.
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Description copied from class: Mbo
        This called whenever a change is made to the attributes of a MBO. The programmer should override if interested in intercepting this event. An example of the use of this is to set the changeby/changedate of a work order whenever one of the attributes is set. If an MXException is thrown from this routine, the change of value is rolled back, this provides a mechanism to abort any changes. Default behavior is to do nothing. The derived method has to call super.modify().
        Overrides:
        modify 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
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Issue#07-23942 Check if CINUM and CollectionNum combination exists in the set. Check if AssetNum and CollectionNum combination exists in the set. Check if Location and CollectionNum combination exists in the set.
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException