criteria.addEqualTo("keyContract", contractId);
criteria.addEqualTo("keyGrantContract", contractId);
    public GrantOrientationTeacher readActualGrantOrientationTeacherByContract(Integer contractId,            Integer idInternal) throws ExcepcaoPersistencia {        List grantOrientationTeacher = null;        Criteria criteria = new Criteria();        criteria.addEqualTo("keyContract", contractId);       // criteria.addNotEqualTo("idInternal", idInternal);        grantOrientationTeacher = queryList(GrantOrientationTeacher.class, criteria, "beginDate", false);        Iterator respIter = grantOrientationTeacher.iterator();        GrantOrientationTeacher orientationTeacher = null;        if (respIter.hasNext())            orientationTeacher = (GrantOrientationTeacher) respIter.next();        return orientationTeacher;    }