Class AantallenValidator

java.lang.Object
nl.b3p.planmonitorwonen.api.validation.AantallenValidator

public final class AantallenValidator extends Object
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 Details

    • EERSTE_JAAR

      public static final int EERSTE_JAAR
      The 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

      public static final Map<String,String> GROEP_ENUM_TYPES
      The enum type in the database with the categorie values per group.
  • Method Details