psdi.app.collection

Class Collection

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


    public class Collection
    extends Mbo
    implements CollectionRemote
    MBO object to represent Collection. See Collections package description for details.

    This is a system level object.

    The key attribute for this object is: COLLECTIONNUM.

    The attributes in this object are as follows:

    Attribute NameDescription.
    COLLECTIONIDUnique ID.
    COLLECTIONNUMIdentifier of the Collection.
    DESCRIPTIONDescription of the Collection.
    ISACTIVEIndicates if the Collection can be used or not.
    • Field Detail

      • skipFieldCopy

        protected static java.util.HashSet skipFieldCopy
        This is a static HashSet that contains the names of the fields whose values need not be copied from the source Mbo to the target Mbo and is used only for duplication the Collection Mbo. This HashSet is loaded in the loadSkipFieldCopyHashSet.
        See Also:
        Collection.loadSkipFieldCopyHashSet(), Collection.skipFieldCopy
      • isHashSetLoaded

        protected static boolean isHashSetLoaded
        This is a protected boolean variable to check if the HashSet has already been loaded. The HashSet is loaded only once since it is static. The same hashSet can be used by all duplicate methods once it has been loaded
    • Constructor Detail

      • Collection

        public Collection(MboSet ms)
                   throws MXException,
                          java.rmi.RemoteException
        Constructs the Collection 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
      • getIsDuplicate

        public boolean getIsDuplicate()
        returns whether a collection is being crated during a duplciate process or not
      • add

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

        protected void loadSkipFieldCopyHashSet()
                                         throws MXException,
                                                java.rmi.RemoteException
        Loads the static HashSet with the names of the fields whose values need not be copied from the source Mbo to the target Mbo when a duplicate operation is performed. As an example the collectionnum is one of the fields that need not be copied and the hashSet is loaded in the following way skipFieldCopy.add("COLLECTIONNUM") The following is the list of fields that are not copied from the source Collection to the target Collection.
        1. COLLECTIONNUM
        These are the field names that are loaded into the HashSet.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        Mbo.skipCopyField(psdi.mbo.MboValueInfo), psdi.app.collection.collection#skipCopyField, psdi.app.collection.collection#duplicate
      • 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 skipped by using the data from the static HashSet. If this field does not need to be copied return true.
        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:
        java.rmi.RemoteException
        MXException
        See Also:
        Collection.loadSkipFieldCopyHashSet()
      • duplicate

        public MboRemote duplicate()
                            throws MXException,
                                   java.rmi.RemoteException
        duplicates Collection and related objects.
        The duplicated Collection's collectionnum will be an autokeyed value if autokey is enabled. If autokey is not enabled, the collectionnum will need to be provided through the UI.

        Related objects that will also be duplicated are:

        • CollectDetails
        Specified by:
        duplicate in interface MboRemote
        Overrides:
        duplicate in class Mbo
        Returns:
        the newly duplicated Collection MboRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.mbo.Mbo#isAutoKeyed.
      • delete

        public void delete(long accessModifier)
                    throws MXException,
                           java.rmi.RemoteException
        Delete the COLLECTION record and delete associated COLLECTDETAILS records.
        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)
      • deleteAssociatedRecords

        protected void deleteAssociatedRecords()
                                        throws MXException,
                                               java.rmi.RemoteException
        Delete records associated with this COLLECTION
        Throws:
        MXException
        java.rmi.RemoteException