ItEr29S16CUCreacionProxectoCategorizacionTraballoItEr10S11: Not allow create orders with initDate null.
This commit is contained in:
parent
09ac30af47
commit
174f82e16b
1 changed files with 5 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
|||
package org.navalplanner.business.orders.entities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
@ -101,6 +102,10 @@ public class Order extends OrderLineGroup implements IValidable {
|
|||
|
||||
@Override
|
||||
public void checkValid() throws ValidationException {
|
||||
if (this.getInitDate() == null) {
|
||||
throw new ValidationException("initDate must not be null");
|
||||
}
|
||||
|
||||
if (this.isEndDateBeforeStart()) {
|
||||
throw new ValidationException("endDate must be after startDate");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue