Class AantallenValidator
java.lang.Object
nl.b3p.planmonitorwonen.api.validation.AantallenValidator
Validates the aantallen of a planregistratie with the same rules as the categorie table in the frontend. A categorie
or year not filled in counts as zero.
- the numbers are not negative and gerealiseerd is not more than gepland
- the years are within the years shown in the frontend
- for each categorie except sloop the numbers per year add up to gepland minus gerealiseerd
- for each categorie group the gepland numbers add up to bruto
- for each categorie group and year the numbers add up to the number of bruto for that year
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe years shown in the frontend, for the first 10 years per year and then two periods of 5 years.The enum type in the database with the categorie values per group.static final int -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvalidate(Aantallen aantallen, EnumValues enumValues, List<ValidationError> errors)
-
Field Details
-
EERSTE_JAAR
public static final int EERSTE_JAARThe years shown in the frontend, for the first 10 years per year and then two periods of 5 years.- See Also:
-
LAATSTE_JAAR
public static final int LAATSTE_JAAR- See Also:
-
GROEP_ENUM_TYPES
-
-
Method Details
-
validate
public static void validate(Aantallen aantallen, EnumValues enumValues, List<ValidationError> errors)
-