if (specialSeasonCode == null) { if (!getActiveStudentCurricularPlan().getSpecialSeasonEnrolments(executionYear).isEmpty()) { throw new DomainException("error.cannot.change.specialSeasonCode"); } else { deleteYearSpecialSeasonCode(executionYear); } } else { if (specialSeasonCode.getMaxEnrolments() < getActiveStudentCurricularPlan() .getSpecialSeasonEnrolments(executionYear).size()) { throw new DomainException("error.cannot.change.specialSeasonCode"); } else { changeYearSpecialSeasonCode(executionYear, specialSeasonCode); } }
if (specialSeasonCode == null) { if (!getActiveStudentCurricularPlan().getSpecialSeasonEnrolments(executionYear).isEmpty()) { throw new DomainException("error.cannot.change.specialSeasonCode"); } else { deleteYearSpecialSeasonCode(executionYear); } } else { if (specialSeasonCode.getMaxEnrolments() < getActiveStudentCurricularPlan() .getSpecialSeasonEnrolments(executionYear).size()) { throw new DomainException("error.cannot.change.specialSeasonCode"); } else { changeYearSpecialSeasonCode(executionYear, specialSeasonCode); }
	public void setSpecialSeasonCode(ExecutionYear executionYear, SpecialSeasonCode specialSeasonCode) {		if (specialSeasonCode == null) {			if (!getActiveStudentCurricularPlan().getSpecialSeasonEnrolments(executionYear).isEmpty()) {				throw new DomainException("error.cannot.change.specialSeasonCode");			} else {				deleteYearSpecialSeasonCode(executionYear);			}		} else {			if (specialSeasonCode.getMaxEnrolments() < getActiveStudentCurricularPlan()					.getSpecialSeasonEnrolments(executionYear).size()) {				throw new DomainException("error.cannot.change.specialSeasonCode");			} else {				changeYearSpecialSeasonCode(executionYear, specialSeasonCode);			}		}	}