}
executionSemester.setState(periodState);
executionSemester.getExecutionYear().setState(periodState);
} else {
executionSemester.setState(periodState);
PeriodState currentPeriodState = periodState;
for (final ExecutionSemester otherExecutionPeriod : executionYear.getExecutionPeriodsSet()) {
if (currentPeriodState != null
&& !otherExecutionPeriod.getState().getStateCode().equals(currentPeriodState.getStateCode())) {
currentPeriodState = null;
}
}
if (currentPeriodState != null) {
executionYear.setState(currentPeriodState);