@Override public int addChargePoint(ChargePointForm form) { return ctx.transactionResult( configuration -> { DSLContext ctx = DSL.using(configuration); try { Integer addressId = addressRepository.updateOrInsert(ctx, form.getAddress()); return addChargePointInternal(ctx, form, addressId); } catch (DataAccessException e) { throw new SteveException( "Failed to add the charge point with chargeBoxId '%s'", form.getChargeBoxId(), e); } }); }