Class PlanmonitorWonenDatabaseService

java.lang.Object
nl.b3p.planmonitorwonen.api.PlanmonitorWonenDatabaseService

@Service @Profile("!test") public class PlanmonitorWonenDatabaseService extends Object
  • Constructor Details

    • PlanmonitorWonenDatabaseService

      public PlanmonitorWonenDatabaseService(org.springframework.jdbc.core.simple.JdbcClient jdbcClient)
  • Method Details

    • getPlanregistratiesForProvincie

      @Transactional(readOnly=true, isolation=REPEATABLE_READ) public List<Planregistratie> getPlanregistratiesForProvincie(boolean withAantallen)
      Returns all planregistraties, with the aantallen if requested. Uses a repeatable read transaction so the aantallen are consistent with the planregistraties.
    • getPlanregistratiesForGemeentes

      @Transactional(readOnly=true, isolation=REPEATABLE_READ) public List<Planregistratie> getPlanregistratiesForGemeentes(Collection<String> gemeentes, boolean withAantallen)
    • getPlanregistratie

      @Transactional(readOnly=true, isolation=REPEATABLE_READ) public Optional<Planregistratie> getPlanregistratie(String id)
      Returns a planregistratie with its aantallen.
    • deletePlanregistratie

      @Transactional public Optional<String> deletePlanregistratie(String id)
      Deletes a planregistratie including the aantallen.
      Returns:
      the plan name of the deleted planregistratie, for logging, or empty when it did not exist
    • insertPlanregistratie

      @Transactional public void insertPlanregistratie(Planregistratie planregistratie, String username) throws org.locationtech.jts.io.ParseException
      Inserts a planregistratie or replaces an existing one, including the aantallen. The creator, createdAt, editor and editedAt fields of the planregistratie are set from the username and the current time, the values from the client are ignored. For an existing planregistratie the creator and createdAt are kept.
      Throws:
      PlanNaamInUseException - when another planregistratie has the same plan name
      org.locationtech.jts.io.ParseException
    • getEnumValues

      public EnumValues getEnumValues()
      Returns the values of the enum types of the planmonitor wonen schema.
    • getProvincieForGemeente

      public Optional<String> getProvincieForGemeente(String gemeente)
    • geometryIntersectsGemeente

      public Optional<Boolean> geometryIntersectsGemeente(String gemeente, String wkt) throws org.locationtech.jts.io.ParseException
      Returns whether the geometry intersects the geometry of the gemeente, or empty for an unknown gemeente.
      Throws:
      org.locationtech.jts.io.ParseException
    • getPlanregistratieGemeente

      public String getPlanregistratieGemeente(String id)