IShift shift = ((ShiftStudent) studentShifts.get(i)).getShift();
IShift shift = ((IShiftStudent) studentShifts.get(i)).getShift();
    public List readLessonsByStudent(String username) throws ExcepcaoPersistencia {        Criteria crit = new Criteria();        crit.addEqualTo("aluno.person.username", username);        List studentShifts = queryList(ShiftStudent.class, crit);        if (studentShifts == null) {            return null;        }        List lessons = new ArrayList();        for (int i = 0; i < studentShifts.size(); i++) {            IShift shift = ((ShiftStudent) studentShifts.get(i)).getShift();            List auxLessons = shift.getAssociatedLessons();            if (auxLessons != null) {                lessons.addAll(auxLessons);            }        }        return lessons;    }