if (newShiftCapacity.intValue() > maxCapacity.intValue()) { throw new InvalidNewShiftCapacity(); }
	private void newShiftIsValid(		InfoShift infoShiftOld,		TipoAula newShiftType,		InfoExecutionCourse newShiftExecutionCourse,		Integer newShiftCapacity)		throws FenixServiceException {					// 1. Read shift lessons		List shiftLessons = null;		ITurno shift = null;		try {			ISuportePersistente sp;			sp = SuportePersistenteOJB.getInstance();			shift =				(ITurno) sp.getITurnoPersistente().readByOID(					Turno.class,					infoShiftOld.getIdInternal());			shiftLessons = shift.getAssociatedLessons();		} catch (ExcepcaoPersistencia ex) {			throw new FenixServiceException(ex);		}		// 2. Count shift total duration and get maximum lesson room capacity		Integer maxCapacity = new Integer(0);		double shiftDuration = 0;		for (int i = 0; i < shiftLessons.size(); i++) {			IAula lesson = ((IAula) shiftLessons.get(i));			shiftDuration				+= (getLessonDurationInMinutes(lesson).doubleValue() / 60);			if (lesson.getSala().getCapacidadeNormal().intValue() > maxCapacity.intValue()) {				maxCapacity = lesson.getSala().getCapacidadeNormal();			}		}		// 3a. If NEW shift type is diferent from CURRENT shift type		//     check if shift total duration exceeds new shift type duration 		if (!newShiftType.equals(infoShiftOld.getTipo())) {			if (!newShiftTypeIsValid(shift, newShiftType, shiftDuration)) {				throw new InvalidNewShiftType();			}		}		// 3b. If NEW shift executionCourse is diferent from CURRENT shift executionCourse		//     check if shift total duration exceeds new executionCourse duration		if (!newShiftExecutionCourse			.equals(infoShiftOld.getInfoDisciplinaExecucao())) {			if (!newShiftExecutionCourseIsValid(shift,				newShiftExecutionCourse,				shiftDuration)) {				throw new InvalidNewShiftExecutionCourse();			}		}				// 4. Check if NEW shift capacity is bigger then maximum lesson room capacity		if (newShiftCapacity.intValue() > maxCapacity.intValue()) {			throw new InvalidNewShiftCapacity();		}			}