Jdbc Location Repository
Database-backed LocationRepository that works for SQLite and MySQL/MariaDB — the SQL is deliberately dialect-agnostic (CREATE TABLE IF NOT EXISTS, INT/VARCHAR, a composite primary key). It talks to a JDBC DataSource (a HikariCP pool in production) and touches only java.sql / javax.sql, so nothing here needs to be shaded into the plugin jar.
Writes are per-owner and transactional: saveOwners deletes and re-inserts each given owner's rows inside one transaction.
Functions
Loads every stored location. Malformed entries are skipped, not fatal.
Persists exactly the owners in owners, sourcing each owner's current locations from locationsOf. An owner with no locations is removed from storage. This is the incremental write path — callers pass only the owners that changed.