System.out.println("RESULT " + result);
    public List readClassesThatContainsStudentAttendsOnExecutionPeriod(Integer studentOID,            Integer executionPeriodOID) throws ExcepcaoPersistencia {        IExecutionPeriod executionPeriod = (IExecutionPeriod) readByOID(ExecutionPeriod.class,                executionPeriodOID);        IStudent student = (IStudent) readByOID(Student.class, studentOID);        System.out.println("STUDENT --> " + student);        List<ISchoolClass> result = new ArrayList();        List<ISchoolClass> schoolClasses = executionPeriod.getSchoolClasses();        for (ISchoolClass schoolClass : schoolClasses) {            List<IShift> shifts = schoolClass.getAssociatedShifts();            for (IShift shift : shifts) {                if (shift.getDisciplinaExecucao().getExecutionPeriod().getIdInternal().equals(                        executionPeriod.getIdInternal())) {                    List<IStudent> students = shift.getDisciplinaExecucao().getAttendingStudents();                    System.out.println("DISCIPLINA --> " + shift.getDisciplinaExecucao().getNome());                    if (students.contains(student)) {                        System.out.println("O ALUNO EST NA LISTA!!!");                        result.add(schoolClass);                    }                }            }        }                /*List<IAttends> attendsList = student.getAssociatedAttends();        for(IAttends attends : attendsList){            IExecutionCourse executionCourse = attends.getDisciplinaExecucao();            if(executionCourse.getExecutionPeriod().getIdInternal().equals(executionPeriodOID)){                //result.add(schoolClass)                List<IShift> shifts = executionCourse.getAssociatedShifts();                for(IShift shift : shifts){                   List<ISchoolClass> schoolClasses = shift.getAssociatedClasses();                }            }        }*/                        System.out.println("RESULT " + result);        return result;        /*         * Criteria criteria = new Criteria();         * criteria.addEqualTo("associatedShifts.disciplinaExecucao.attendingStudents.idInternal",         * student .getIdInternal());         * criteria.addEqualTo("associatedShifts.disciplinaExecucao.executionPeriod.idInternal",         * executionPeriod.getIdInternal()); return queryList(SchoolClass.class,         * criteria, true);         */    }