for (;!getParentContexts().isEmpty(); getParentContexts().get(0).delete()); for (;!getCurricularRules().isEmpty(); getCurricularRules().get(0).delete()); for (;!getParticipatingPrecedenceCurricularRules().isEmpty(); getParticipatingPrecedenceCurricularRules().get(0).delete()); for (;!getParticipatingExclusivenessCurricularRules().isEmpty(); getParticipatingExclusivenessCurricularRules().get(0).delete());
if(getCanBeDeleted()) { for (;!getParentContexts().isEmpty(); getParentContexts().get(0).delete()); for (;!getCurricularRules().isEmpty(); getCurricularRules().get(0).delete()); for (;!getParticipatingPrecedenceCurricularRules().isEmpty(); getParticipatingPrecedenceCurricularRules().get(0).delete()); for (;!getParticipatingExclusivenessCurricularRules().isEmpty(); getParticipatingExclusivenessCurricularRules().get(0).delete()); } else { throw new DomainException("courseGroup.notEmptyCurriculumModules"); }
    public void delete() {        for (;!getParentContexts().isEmpty(); getParentContexts().get(0).delete());        for (;!getCurricularRules().isEmpty(); getCurricularRules().get(0).delete());        for (;!getParticipatingPrecedenceCurricularRules().isEmpty(); getParticipatingPrecedenceCurricularRules().get(0).delete());        for (;!getParticipatingExclusivenessCurricularRules().isEmpty(); getParticipatingExclusivenessCurricularRules().get(0).delete());    }