code: public static long insertLasSource( ASpatialDb db, int srid, int levels, double resolution, double factor, Polygon polygon,
              String name, double minElev, double maxElev, double minIntens, double maxIntens ) throws Exception {
          String sql = "INSERT INTO " + TABLENAME//
                  + " (" + COLUMN_GEOM + "," + COLUMN_NAME + "," + COLUMN_RESOLUTION + "," //
                  + COLUMN_FACTOR + "," + COLUMN_LEVELS + "," + COLUMN_MINZ + "," + COLUMN_MAXZ + "," + COLUMN_MININTENSITY + ","
                  + COLUMN_MAXINTENSITY + //
                  ") VALUES (ST_GeomFromText(?, " + srid + "),?,?,?,?,?,?,?,?)";
  
          return db.execOnConnection(connection -> {
              try (IHMPreparedStatement pStmt = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS)) {
                  pStmt.setString(1, polygon.toText());
                  pStmt.setString(2, name);
                  pStmt.setDouble(3, resolution);
                  pStmt.setDouble(4, factor);
                  pStmt.setInt(5, levels);
                  pStmt.setDouble(6, minElev);
                  pStmt.setDouble(7, maxElev);
                  pStmt.setDouble(8, minIntens);
                  pStmt.setDouble(9, maxIntens);
  
                  pStmt.executeUpdate();
                  IHMResultSet rs = pStmt.getGeneratedKeys();
                  rs.next();
                  long generatedId = rs.getLong(1);
  
                  return generatedId;
              }
          });
  
      }
docs: Insert values in the table
  
  @param db the db to use.
  @param srid the epsg code.
  @param levels the levels that are created for this source.
  @param resolution the resolution of trhe base cells.
  @param factor the level multiplication factor.
  @param polygon the polygon geometry bounds of the source.
  @param name the name of the source.
  @param minElev the min elevation.
  @param maxElev the max elevation.
  @param minIntens the min intensity.
  @param maxIntens the max intensity.
  @return the source id.
  @throws Exception