    public List<Teacher> findAvailables(TU tu, Date date, Integer duration) {
        Query q = entityManager.createNativeQuery("SELECT teacher_busy(?, ?, ?) FROM dual");
        q.setParameter(2, date);
        q.setParameter(3, duration);
        List<Teacher> availableTeachers = new ArrayList<Teacher>();
        for (Teacher t : tu.getCompetentTeachers()) {
            if (((BigDecimal)q.setParameter(1, t.getId()).getSingleResult()).intValue() == 0) {
                availableTeachers.add(t);
            }
        }
        return availableTeachers;
    }

    public List<Teacher> findAvailables(TU tu, Date date, Integer duration) {
        Query q = entityManager.createNativeQuery("SELECT teacher_busy(?1, ?2, ?3) FROM dual");
        q.setParameter(2, date);
        q.setParameter(3, duration);
        List<Teacher> availableTeachers = new ArrayList<Teacher>();
        for (Teacher t : tu.getCompetentTeachers()) {
            if (((BigDecimal)q.setParameter(1, t.getId()).getSingleResult()).intValue() == 0) {
                availableTeachers.add(t);
            }
        }
        return availableTeachers;
    }
