Apply validation annotation to the field

Because it's a value object this is not dangerous, i.e., it can't be a
proxy. Now it's really checked a not null value is not saved.
This commit is contained in:
Óscar González Fernández 2011-02-21 17:00:39 +01:00
parent 03febe580f
commit a196487fd0

View file

@ -461,6 +461,7 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
private AssignmentFunction assignmentFunction;
@OnCopy(Strategy.SHARE)
@NotNull
private ResourcesPerDay resourcesPerDay;
private Integer intendedTotalHours;
@ -1552,7 +1553,6 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
return calculateResourcesPerDayFromAssignments(getConsolidatedAssignments());
}
@NotNull
public ResourcesPerDay getResourcesPerDay() {
if (resourcesPerDay == null) {
return ResourcesPerDay.amount(0);