geopackage-sdk/src/main/java/mil/nga/geopackage/db/metadata/TableMetadataDataSource.java
public void create(TableMetadata metadata) {
        ContentValues values = new ContentValues();
        values.put(TableMetadata.COLUMN_GEOPACKAGE_ID, metadata.getGeoPackageId());
        values.put(TableMetadata.COLUMN_TABLE_NAME, metadata.getTableName());
        values.put(TableMetadata.COLUMN_LAST_INDEXED, metadata.getLastIndexed());
        long insertId = db.insert(
                TableMetadata.TABLE_NAME, null,
                values);
        if (insertId == -1) {
            throw new GeoPackageException(
                    "Failed to insert table metadata. GeoPackage Id: "
                            + metadata.getGeoPackageId() + ", Table Name: "
                            + metadata.getTableName() + ", Last Indexed: "
                            + metadata.getLastIndexed());
        }
    }
public void create(TableMetadata metadata) {
        ContentValues values = new ContentValues();
        values.put(TableMetadata.COLUMN_GEOPACKAGE_ID, metadata.getGeoPackageId());
        values.put(TableMetadata.COLUMN_TABLE_NAME, metadata.getTableName());
        values.put(TableMetadata.COLUMN_LAST_INDEXED, metadata.getLastIndexed());
        long insertId = db.insert(
                TableMetadata.TABLE_NAME, null,
                values);
        if (insertId == -1) {
            throw new GeoPackageException(
                    "Failed to insert table metadata. GeoPackage Id: "
                            + metadata.getGeoPackageId() + ", Table Name: "
                            + metadata.getTableName() + ", Last Indexed: "
                            + metadata.getLastIndexed());
        }
    }
public void create ( TableMetadata metadata ) { ContentValues values = new ContentValues ( ) ; values . put ( TableMetadata . COLUMN_GEOPACKAGE_ID , metadata . getGeoPackageId ( ) ) ; values . put ( TableMetadata . COLUMN_TABLE_NAME , metadata . getTableName ( ) ) ; values . put ( TableMetadata . COLUMN_LAST_INDEXED , metadata . getLastIndexed ( ) ) ; long insertId = db . insert ( TableMetadata . TABLE_NAME , null , values ) ; if ( insertId == - 1 ) { throw new GeoPackageException ( "Failed to insert table metadata. GeoPackage Id: " + metadata . getGeoPackageId ( ) + ", Table Name: " + metadata . getTableName ( ) + ", Last Indexed: " + metadata . getLastIndexed ( ) ) ; } }
Create a new table metadata

@param metadata table metadata
Create a new table metadata