List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutSpecialSituations(occupationPeriod
List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutEndSituations(occupationPeriod
    public Category getCategoryForCreditsByPeriod(ExecutionPeriod executionPeriod) {        OccupationPeriod occupationPeriod = getLessonsPeriod(executionPeriod);        if (occupationPeriod == null) {            return null;        }        List<TeacherLegalRegimen> list = getAllLegalRegimensWithoutSpecialSituations(occupationPeriod                .getStart(), occupationPeriod.getEnd());        if (list.isEmpty()) {            return null;        } else {            Collections.sort(list, new BeanComparator("beginDate"));            return list.get(list.size() - 1).getCategory();        }    }