Class TableMetadataDataSource

java.lang.Object
mil.nga.geopackage.db.metadata.TableMetadataDataSource

public class TableMetadataDataSource extends Object
Table metadata Data Source
  • Constructor Details

    • TableMetadataDataSource

      public TableMetadataDataSource(GeoPackageMetadataDb db)
      Constructor
      Parameters:
      db - GeoPackage metadata db
  • Method Details

    • create

      public void create(TableMetadata metadata)
      Create a new table metadata
      Parameters:
      metadata - table metadata
    • delete

      public boolean delete(TableMetadata metadata)
      Delete the table metadata
      Parameters:
      metadata - table metadata
      Returns:
      deleted flag
    • delete

      public int delete(String geoPackage)
      Delete the database
      Parameters:
      geoPackage - GeoPackage name
      Returns:
      deleted count
    • delete

      public int delete(long geoPackageId)
      Delete the database
      Parameters:
      geoPackageId - GeoPackage id
      Returns:
      deleted count
    • delete

      public boolean delete(String geoPackage, String tableName)
      Delete the database table name
      Parameters:
      geoPackage - GeoPackage name
      tableName - table name
      Returns:
      deleted flag
    • delete

      public boolean delete(long geoPackageId, String tableName)
      Delete the database table name
      Parameters:
      geoPackageId - GeoPackage id
      tableName - table name
      Returns:
      deleted flag
    • updateLastIndexed

      public boolean updateLastIndexed(TableMetadata metadata, long lastIndexed)
      Update the last indexed time
      Parameters:
      metadata - table metadata
      lastIndexed - last indexed
      Returns:
      updated flag
    • updateLastIndexed

      public boolean updateLastIndexed(String geoPackage, String tableName, long lastIndexed)
      Update the last indexed time
      Parameters:
      geoPackage - GeoPackage name
      tableName - table name
      lastIndexed - last indexed
      Returns:
      updated flag
    • updateLastIndexed

      public boolean updateLastIndexed(long geoPackageId, String tableName, long lastIndexed)
      Update the last indexed time
      Parameters:
      geoPackageId - GeoPackage id
      tableName - table name
      lastIndexed - last indexed
      Returns:
      updated flag
    • get

      public TableMetadata get(String geoPackage, String tableName)
      Get a table metadata
      Parameters:
      geoPackage - GeoPackage name
      tableName - table name
      Returns:
      table metadata
    • get

      public TableMetadata get(long geoPackageId, String tableName)
      Get a table metadata
      Parameters:
      geoPackageId - GeoPackage id
      tableName - table name
      Returns:
      table metadata
    • getOrCreate

      public TableMetadata getOrCreate(String geoPackage, String tableName)
      Get a table metadata or create if it does not exist
      Parameters:
      geoPackage - GeoPackage name
      tableName - table name
      Returns:
      table metadata
    • getGeoPackageId

      public long getGeoPackageId(String geoPackage)
      Get a GeoPackage id from the name
      Parameters:
      geoPackage - GeoPackage name
      Returns:
      id