public void calculateIntervalBalance(DateInterval interval) { List<DailyBalance> dailyBalanceList = new ArrayList();
public List calculateIntervalBalance(DateInterval interval) { List<DailyBalance> dailyBalanceList = new ArrayList<DailyBalance>();
    public void calculateIntervalBalance(DateInterval interval) {    		List<DailyBalance> dailyBalanceList = new ArrayList();    		List<Schedule> scheduleList = getSchedulesWithInterval(interval);    		// para cada dia do intervalo ver q horario esta definido nesse dia    		for (YearMonthDay date = interval.getStartDate(); date.isBefore(interval.getEndDate()); date.plusDays(1)) {    			// percorrer os schedules (tipicamente ha' 1 mas pode haver varios...    			for (Schedule schedule: scheduleList) {    				    				WorkSchedule workSchedule = schedule.workScheduleWithDate(date);    				DailyBalance dailyBalance = new DailyBalance(date);    				if (workSchedule != null) { // nao ha horario neste dia    					dailyBalance.setWorkSchedule(workSchedule);    					List<Clocking> clockingList = clockingsWithDate(date);    					List<Leave> leaveList = leavesWithDate(date);    					if (clockingList.size() > 0) {    						dailyBalance.setClockingList(clockingList);    					}    					if (leaveList.size() > 0) {    						dailyBalance.setLeaveList(leaveList);    					}    					dailyBalance = calculateDailyBalance(date, workSchedule, clockingList, leaveList);    					dailyBalanceList.add(dailyBalance);    				} else { // nao ha horario neste dia => sabado ou domingo     					// neste caso devia ter info de DSC e DS?    					// TODO ver esta situacao    				}    			}    		}    }