com.ibm.tivoli.maximo.amcrew.app

Class AMCrewLabor

  • java.lang.Object
    • Field Detail

      • datesOverlapping

        public boolean datesOverlapping
        Flag is set if the 'DatesOverlapping' method is called
    • Constructor Detail

      • AMCrewLabor

        public AMCrewLabor(MboSet ms)
                    throws java.rmi.RemoteException
        Parameters:
        ms -
        Throws:
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException
        Description copied from class: Mbo
        Called by the framework when the Mbo has been constructed and the MboValues have been initialized. This can be overridden by the programmer to provide any custom initialization they would like to do.
        Overrides:
        init in class Mbo
        Throws:
        MXException
        See Also:
        Mbo.init()
      • 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 MboRemote
        Overrides:
        add in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        MboRemote.add()
      • 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
        See Also:
        Mbo.canDelete()
      • 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)
      • matchLaborCraftSkill

        protected MboRemote matchLaborCraftSkill(java.lang.String laborCode,
                                                 java.lang.String craft,
                                                 java.lang.String skillLevel)
                                          throws MXException,
                                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • save

        public void save()
                  throws MXException,
                         java.rmi.RemoteException
        Action when AMCrewLbor record is being saved
        Overrides:
        save in class Mbo
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForCrewAlreadyAssigned

        public boolean checkForCrewAlreadyAssigned(java.lang.String laborCode,
                                                   java.util.Date EffectiveDate)
                                            throws MXException,
                                                   java.rmi.RemoteException
        Check to determine whether the selected labor has already been assigned to an existing active crew.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForCalShifNum

        public boolean checkForCalShifNum()
                                   throws MXException,
                                          java.rmi.RemoteException
        Check for whether the selected labor is available for the Calendar and Shiftnum of the crew.
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForValidQualification

        public boolean checkForValidQualification(java.lang.String sPosition)
                                           throws MXException,
                                                  java.rmi.RemoteException
        To Check the selected Labor has all the qualifications required for the Craft position
        Parameters:
        sPosition - the position for which the labor is selected
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • checkLaborCraftSkill

        protected boolean checkLaborCraftSkill(java.lang.String laborCode,
                                               java.lang.String position,
                                               UserInfo userInfo)
                                        throws MXException,
                                               java.rmi.RemoteException
        Checks whether the selected Labor has all the Craft and Skill Level as required by the Position.
        Parameters:
        laborCode - the laborCode of the selected labor from the lookup
        position - the value of position as selected by the user
        userInfo - the UserInfo object
        Returns:
        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
      • getEffectiveDate

        public java.util.Date getEffectiveDate(java.util.Date effectivedate)
                                        throws MXException,
                                               java.rmi.RemoteException
        Calculate Effective Date
        Throws:
        MXException
        java.rmi.RemoteException
      • checkForDatesOverlapping

        public void checkForDatesOverlapping(MboRemote mbo)
                                      throws MXException,
                                             java.rmi.RemoteException
        If the Labor exists in AMCREWLABOR table and dates are overlapping: If the existing record has an 'End Date' and specified 'Effect Date or End Date' are between, existing records 'Effective Date and End Date' OR If the existing record has no 'End Date' and the specified 'Effect Date' is after the existing record's 'Effect Date'
        Specified by:
        checkForDatesOverlapping in interface AMCrewLaborRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        AMCrewLabor#checkForDatesOverlapping(mbo)
      • setisDatesOverlapping

        public void setisDatesOverlapping(boolean datesOverlapping)
                                   throws MXException,
                                          java.rmi.RemoteException
        set this value from 'checkForDatesOverlapping' method on YES
        Specified by:
        setisDatesOverlapping in interface AMCrewLaborRemote
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        AMCrewLabor#setisDatesOverlapping()
      • setValidateLaborField

        public void setValidateLaborField(boolean validateLaborField)
      • getValidateLaborField

        public boolean getValidateLaborField()
      • setValidateCraftField

        public void setValidateCraftField(boolean validateCraftField)
      • getValidateCraftField

        public boolean getValidateCraftField()
      • setValidateSkillLevelField

        public void setValidateSkillLevelField(boolean validateSkillLevelField)
      • getValidateSkillLevelField

        public boolean getValidateSkillLevelField()
      • setValidateVendorField

        public void setValidateVendorField(boolean validateVendorField)
      • getValidateVendorField

        public boolean getValidateVendorField()
      • setValidateContractField

        public void setValidateContractField(boolean validateContractField)
      • getValidateContractField

        public boolean getValidateContractField()
      • setEffectiveDateIsLater

        public void setEffectiveDateIsLater(boolean laterEffectivedate)
      • isLaterEffectiveDate

        public boolean isLaterEffectiveDate()
      • setEarlierEndDate

        public void setEarlierEndDate(boolean earlierEndDate)
      • isEndDateEarlier

        public boolean isEndDateEarlier()
      • findAvailableTime

        public double findAvailableTime(java.util.Date shiftStart,
                                        java.util.Date shiftEnd,
                                        java.util.Date crewDate)
                                 throws MXException,
                                        java.rmi.RemoteException
        Based on the shift start and shift end, we will return the total time available for this tool in hours.
        Parameters:
        shiftStart -
        shiftEnd -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • setCreatedBySplit

        public void setCreatedBySplit(boolean cbs)
      • getCreatedBySplit

        public boolean getCreatedBySplit()
      • getHasCrewPrompt

        public boolean getHasCrewPrompt()
      • setHasCrewPrompt

        public void setHasCrewPrompt(boolean prompt)