psdi.app.inspection

Class InspectionForm

    • Field Detail

      • skipFieldCopy

        protected static java.util.Set 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 INSPECTIONFORM Mbo. This HashSet is loaded in the loadSkipFieldCopyHashSet.
        See Also:
        InspectionForm.loadSkipFieldCopyHashSet(), InspectionForm.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

      • InspectionForm

        public InspectionForm(MboSet ms)
                       throws java.rmi.RemoteException
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • 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 InspectionFormRemote
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • modify

        public void modify()
                    throws MXException,
                           java.rmi.RemoteException
        Internal method that marks the record as modified. Not usually called except by internal objects. Called whenever a field is modified so we can update the changedate/changeby.
        Overrides:
        modify in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Perform regular appValidate() prior to save().
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • generateAutoKey

        public void generateAutoKey()
                             throws java.rmi.RemoteException,
                                    MXException
        generates an autokey for a new InspectionForm. This is a unique key(inspformnum)that represent a inspection form. The same key is copied to inpsquestion, inspformstatus associated with this inspection form.
        Specified by:
        generateAutoKey in interface MboRemote
        Overrides:
        generateAutoKey in class Mbo
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        MboValue.autoKey()
      • convertIDs

        public java.lang.String[] convertIDs(MboRemote newInspectionMbo,
                                             java.lang.String Fieldnum)
                                      throws java.rmi.RemoteException,
                                             MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Description copied from class: Mbo
        Can the object be deleted ? This is object specific and should be overridden.
        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 InspectionFormRemote
        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)
      • save

        protected void save()
                     throws MXException,
                            java.rmi.RemoteException
        Actions which occur when a inspectionform is saved.
        Overrides:
        save in class StatefulMbo
        Throws:
        MXException - MAXIMO System Error
        java.rmi.RemoteException - RMI Error
      • loadSkipFieldCopyHashSet

        protected void loadSkipFieldCopyHashSet()
                                         throws MXException,
                                                java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • clearSkipCopyFields

        public void clearSkipCopyFields()
                                 throws MXException,
                                        java.rmi.RemoteException
        Clear skipFieldcopy HashSet.
        Throws:
        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 skipped by using the data from the static HashSet. If this field does not need to be copied return true. The following are inspectionform fields that will be skipped without being copied to the newly duplicated inspectionform
        1. status
        2. revsion
        3. name
        4. hasrevision
        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
      • getStatusHandler

        protected StatusHandler getStatusHandler()
        Description copied from class: StatefulMbo
        Return the status handler object to be used for the actual changing of the status. This is only called once by the framework. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHandler in class StatefulMbo
      • getStatusHistory

        protected MboSetRemote getStatusHistory()
                                         throws MXException,
                                                java.rmi.RemoteException
        Description copied from class: StatefulMbo
        Return the MboSet object used for storing the status change history. This method must be provided by the Mbo programmer.
        Specified by:
        getStatusHistory in class StatefulMbo
        Throws:
        MXException
        java.rmi.RemoteException