Custom holiday roll conditions

Infor offers condition class customization for installations requiring additional custom logic to determine the roll type. After all regular holiday roll conditions are checked, custom conditions are evaluated and, if the custom conditions are satisfied, then the holiday roll will fire.

Custom conditions can implement the com.workbrain.app.ta.holiday.HolidayRollCondition interface.

The custom holiday roll condition class is specified on the Holiday Roll page.

Interface definition

/**
 * Interface for Custom Holiday Roll conditions
 */
public interface HolidayRollCondition {
    
    /**
     * Returns whether the employee is eligible for given holiday 
     * based on holiday roll data.
     * @param empData Employee data that holiday roll will be 
     * evaluated against
     * @param holidayRollData Holiday Roll data
     * @param holidayData Holiday data that holiday roll will 
     * apply to
     * @param conn DBConnection
     *
     * @return boolean
     * @throws SQLException
     */
    public boolean isHolidayRollEligible(EmployeeData empData,
        HolidayRollData holidayRollData, HolidayData holidayData,
        DBConnection conn) throws SQLException;
}

Example

public class MyHolidayRollCondition implements HolidayRollCondition {
    
    /**
     * If holiday flag 1 is checked, returns true only if 
     * employee flag1 is checked.
     * Returns true if holiday flag 1 is not checked.
     * @param empData Employee data that holiday roll will be 
     * evaluated against
     * @param holidayRollData Holiday roll data
     * @param holidayData Holiday data that holiday roll will 
     * apply to
     * @param conn DBConnection
     *
     * @return boolean
     * @throws SQLException
     */
    public boolean isHolidayRollEligible(EmployeeData empData, 
        HolidayRollData holidayRollData, HolidayData holidayData, 
        DBConnection conn) throws SQLException {
        if (holidayData.getHolFlag1() != null && 
            holidayData.getHolFlag1().equals(“Y“)
        {
            return empData.getFlag1() != null && 
            empData.getFlag1.equals(“Y“);
        }
        return true;
    }
}