throw new DomainException("outside.weekly.work.load.response.period");
}
final int previousWeekOffset = currentWeekOffset - 1;
final WeeklyWorkLoad lastExistentWeeklyWorkLoad =
getWeeklyWorkLoadsSet().isEmpty() ? null : Collections.max(getWeeklyWorkLoadsSet());
if (lastExistentWeeklyWorkLoad != null && lastExistentWeeklyWorkLoad.getWeekOffset().intValue() == previousWeekOffset) {
throw new DomainException("weekly.work.load.for.previous.week.already.exists");
}
return new WeeklyWorkLoad(this, Integer.valueOf(previousWeekOffset), contact, autonomousStudy, other);
}