Collections.sort(students, new ReverseComparator(new BeanComparator("number")));
Collections.sort(students, new ReverseComparator(numberComparator));
    public static Integer generateStudentNumber(DegreeType degreeType) {        Integer number = Integer.valueOf(0);        List<Student> students = readStudentsByDegreeType(degreeType);        Collections.sort(students, new ReverseComparator(new BeanComparator("number")));        if (!students.isEmpty()) {            number = students.get(0).getNumber();        }        // FIXME: ISTO E UMA SOLUCAO TEMPORARIA DEVIDO A EXISTIREM ALUNOS        // NA SECRETARIA QUE        // POR UM MOTIVO OU OUTRO NAO SE ENCONTRAM NA BASE DE DADOS        if (degreeType.equals(DegreeType.MASTER_DEGREE) && (number.intValue() < 5411)) {            number = Integer.valueOf(5411);        }        return Integer.valueOf(number.intValue() + 1);    }