use of com.revolsys.gis.esri.gdb.file.capi.swig.Table in project com.revolsys.open by revolsys.
the class FileGdbRecordStore method getTableWithWriteLock.
protected Table getTableWithWriteLock(final RecordDefinition recordDefinition) {
synchronized (this.apiSync) {
final Table table = getTable(recordDefinition);
if (table != null) {
final String catalogPath = getCatalogPath(recordDefinition);
final Integer count = Maps.addCount(this.tableWriteLockCountsByCatalogPath, catalogPath);
if (count == 1) {
table.setWriteLock();
table.setLoadOnlyMode(true);
}
}
return table;
}
}
use of com.revolsys.gis.esri.gdb.file.capi.swig.Table in project com.revolsys.open by revolsys.
the class FileGdbRecordStore method releaseTable.
protected void releaseTable(final String catalogPath) {
synchronized (this.apiSync) {
final Geodatabase geodatabase = getGeodatabase();
if (geodatabase != null) {
try {
final Table table = this.tableByCatalogPath.get(catalogPath);
if (table != null) {
final Integer count = Maps.decrementCount(this.tableReferenceCountsByCatalogPath, catalogPath);
if (count == 0) {
try {
this.tableByCatalogPath.remove(catalogPath);
this.tableWriteLockCountsByCatalogPath.remove(catalogPath);
geodatabase.closeTable(table);
} catch (final Exception e) {
Logs.error(this, "Unable to close table: " + catalogPath, e);
} finally {
if (this.tableByCatalogPath.isEmpty()) {
this.geodatabaseReferenceCount--;
}
table.delete();
}
}
}
} finally {
releaseGeodatabase();
}
}
}
}
use of com.revolsys.gis.esri.gdb.file.capi.swig.Table in project com.revolsys.open by revolsys.
the class FileGdbWriter method deleteRecord.
private void deleteRecord(final Record record) {
final Table table = getTable(record);
this.recordStore.deleteRecord(table, record);
}
use of com.revolsys.gis.esri.gdb.file.capi.swig.Table in project com.revolsys.open by revolsys.
the class FileGdbWriter method updateRecord.
private void updateRecord(final Record record) {
final Table table = getTable(record);
this.recordStore.updateRecord(table, record);
}
Aggregations