psdi.app.craft

Class CraftRate

    • Constructor Detail

      • CraftRate

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

      • init

        public void init()
                  throws MXException
        Propagate key flag is set to false to avoid erroneous propagation of key to the craftskill object.
        Overrides:
        init in class Mbo
        Throws:
        MXException
      • add

        public void add()
                 throws MXException,
                        java.rmi.RemoteException
        Add new CraftRate.
        Specified by:
        add in interface MboRemote
        Overrides:
        add in class Mbo
        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 Craft.
        Specified by:
        propagateKeyValue in interface MboRemote
        Overrides:
        propagateKeyValue in class Mbo
        Parameters:
        keyName - Should be equal to "craft" or else nothing will be propagated.
        keyValue - The new value of craft.
        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 HashTable. If this field does not need to be copied return true. The following are Craft field will be skipped without being copied to the newly duplicated Craft
        1. Craft
        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:
        MXException
        java.rmi.RemoteException
      • canDelete

        public void canDelete()
                       throws MXException,
                              java.rmi.RemoteException
        Craft cannot be deleted if it is referenced by any rows in the laborcraftrate, wplabor, joblabor or when the contract status is approved
        Overrides:
        canDelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • undelete

        public void undelete()
                      throws MXException,
                             java.rmi.RemoteException
        Craft cannot be undeleted if it references a skilllevel which is marked for delete.
        Specified by:
        undelete in interface MboRemote
        Overrides:
        undelete in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkContract

        public void checkContract()
                           throws MXException,
                                  java.rmi.RemoteException
        If the contract status is APPR, then the standard rate for this craftrate becomes readonly, else the status is in DRAFT, PNDREV OR WAPPR, then it is editable.
        Throws:
        MXException
        java.rmi.RemoteException
      • getValidContract

        public MboRemote getValidContract(java.util.Date startDate)
                                   throws MXException,
                                          java.rmi.RemoteException
        Returns the contract mbo with valid revision status
        Throws:
        MXException
        java.rmi.RemoteException
      • appValidate

        public void appValidate()
                         throws MXException,
                                java.rmi.RemoteException
        appValidate() Application validation routine called before the craftrate object is saved Method validates if there are multiple craftrate records for the same skilllevel and vendor combination.
        Overrides:
        appValidate in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • isUnique

        public boolean isUnique()
                         throws MXException,
                                java.rmi.RemoteException
        Check for the uniqueness in the current set
        Throws:
        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
        Override delete. Fix for Issue 07-20864
        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)