criteria.addEqualTo("ojbConcreteClass","net.sourceforge.fenixedu.domain.EnrolmentPeriodInClasses");
    public IEnrolmentPeriodInClasses readCurrentClassesEnrollmentPeriodForDegreeCurricularPlan(            IDegreeCurricularPlan degreeCurricularPlan) throws ExcepcaoPersistencia {        Criteria criteria = new Criteria();        criteria.addEqualTo("degreeCurricularPlan.idInternal", degreeCurricularPlan.getIdInternal());        criteria.addEqualTo("executionPeriod.state", PeriodState.CURRENT);        // There seems to be a bug with the queryObject when using extents        // So we'll use queryList for now.        List result = queryList(EnrolmentPeriodInClasses.class, criteria);        if (result != null && !result.isEmpty()) {            return (IEnrolmentPeriodInClasses) result.get(0);        }        return null;        //return (IEnrolmentPeriodInClasses)        // queryObject(EnrolmentPeriodInClasses.class, criteria);    }