private void updateRow(final SimpleFeature modifiedFeature) throws IOException {
final SeLayer layer = getLayer();
final SeCoordinateReference seCoordRef = layer == null ? null : layer.getCoordRef();
final SeUpdate updateStream = (SeUpdate) createStream(SeUpdate.class);
// updateStream.setWriteMode(true);
final LinkedHashMap<Integer, String> mutableColumns = getUpdatableColumnNames();
final String[] rowColumnNames = new ArrayList<String>(mutableColumns.values())
.toArray(new String[0]);
final String typeName = featureType.getTypeName();
final String fid = modifiedFeature.getID();
final long numericFid = ArcSDEAdapter.getNumericFid(fid);
final SeObjectId seObjectId = new SeObjectId(numericFid);
final Command<Void> updateCmd = new Command<Void>() {
@Override
public Void execute(ISession session, SeConnection connection) throws SeException,
IOException {
try {
final SeRow row = updateStream.singleRow(seObjectId, typeName, rowColumnNames);
setRowProperties(modifiedFeature, seCoordRef, mutableColumns, row);
updateStream.execute();
// updateStream.flushBufferedWrites();
} finally {
updateStream.close();
}
return null;
}
};