criteria.addEqualTo("professorship.keyTeacher", teacherID);
criteria.addEqualTo("professorship.keyOrientationTeacher", teacherID);
    public List readOverlappingPeriod(Integer teacherID, Integer executionPeriodID,            DiaSemana weekDay, Date startTime, Date endTime) throws ExcepcaoPersistencia {        Criteria criteria = new Criteria();        criteria.addEqualTo("professorship.executionCourse.keyExecutionPeriod", executionPeriodID);        criteria.addEqualTo("professorship.keyTeacher", teacherID);        criteria.addEqualTo("weekDay", weekDay);        Criteria startCriteria = new Criteria();        startCriteria.addGreaterThan("startTime", startTime);        startCriteria.addLessThan("startTime", endTime);        Criteria endCriteria = new Criteria();        endCriteria.addGreaterThan("endTime", startTime);        endCriteria.addLessThan("startTime", endTime);        Criteria equalCriteria = new Criteria();        equalCriteria.addEqualTo("startTime", startTime);        equalCriteria.addEqualTo("endTime", endTime);        Criteria timeCriteria = new Criteria();        timeCriteria.addOrCriteria(startCriteria);        timeCriteria.addOrCriteria(endCriteria);        timeCriteria.addOrCriteria(equalCriteria);        criteria.addAndCriteria(timeCriteria);        return queryList(SupportLesson.class, criteria);    }