psdi.app.workorder

Class WMAssignment

    • Constructor Detail

      • WMAssignment

        public WMAssignment(MboSet ms)
                     throws MXException,
                            java.rmi.RemoteException
        Your basic construtor
        Parameters:
        ms - The WMAssignment MboSet.
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Initialization routine. If a WMAssignment object is being initialized, it's because we're in Assignment Manager. Assignments absolutely cannot be updated there, so if this object isn't being added, we simply set the NoUpdate flag to true. If it's a new object, there are a couple of things to do, but the various checks done in Assignment are not necessary because the user can change the object only once.
        Overrides:
        init in class Assignment
        Throws:
        MXException
      • validateKeyUniqueness

        public void validateKeyUniqueness()
                                   throws MXException,
                                          java.rmi.RemoteException
        Override this method and do nothing; the WMAssignment object isn't going to be saved anyway -- a corresponding Assignment will be instead -- so there's no need to bother. Moreover, a WMAssignment object would fail the test, since we don't bother to provide an AssignmentID.
        Overrides:
        validateKeyUniqueness in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Method for saving new Assignment records. The records actually created are WMAssignment records, which can't be saved because WMAssignment is a non-standard view. The procedure is to make an Assignment object for each WMAssignment object that's to be saved. A new AssignmentSet is created to hold the new Assignment. The tricky parts are that 1) the WMAssignmentSet must be set to NOSAVE = true, or else the framework will try to save it; however, it must be set back to NOSAVE = false or else no new records can be saved in the future (AssignmentSet.fireEventsAfterDB handles this); 2) the transaction must be cleared or the resetting of the NoSave flag won't work; and 3) there may be multiple new rows and adding rows after the NoSave flag is set won't work, so it can't be set until the end; thus, the number being added must be determined so we'll know when to set the flag.
        Overrides:
        save in class Assignment
        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)
      • 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
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        Description copied from class: Mbo
        Pre-save validation method. Programmer can override with specific rules.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • clearClassification

        public void clearClassification()
                                 throws java.rmi.RemoteException,
                                        MXException
        IJ35085: providing the method clearClassification when user set up CLASSSTRUCTURE.HIERARCHYPATH and put it in Assignment Manager. This is to prevent
        Throws:
        java.rmi.RemoteException
        MXException