public TableMetadata getOrCreate ( String geoPackage , String tableName ) { GeoPackageMetadataDataSource ds = new GeoPackageMetadataDataSource ( db ) ; GeoPackageMetadata geoPackageMetadata = ds . getOrCreate ( geoPackage ) ; TableMetadata metadata = get ( geoPackageMetadata . getId ( ) , tableName ) ; if ( metadata == null ) { metadata = new TableMetadata ( ) ; metadata . setGeoPackageId ( geoPackageMetadata . getId ( ) ) ; metadata . setTableName ( tableName ) ; create ( metadata ) ; } return metadata ; }
Get a table metadata or create if it does not exist