@Override protected int findMaxSyntheticId() throws IOException { // find max id < 0 ColumnImpl idCol = _systemCatalog.getColumn(CAT_COL_ID); _systemCatalogCursor.reset(); int curMaxSynthId = Integer.MIN_VALUE; while(_systemCatalogCursor.moveToNextRow()) { int id = (Integer)_systemCatalogCursor.getCurrentRowValue(idCol); if((id > curMaxSynthId) && (id < 0)) { curMaxSynthId = id; } } return curMaxSynthId; } }
public synchronized Object getObject(int row, int column) { if (columns == null || cursor == null) { return null; } try { Column c = columns.get(column); if (curPos == null) { cursor.reset(); cursor.moveNextRows(row + 1); } else { int diff = row + 1 - curPos; if (diff > 0) { cursor.moveNextRows(diff); } else if (diff < 0) { cursor.movePreviousRows(-diff); } } curPos = row + 1; return cursor.getCurrentRowValue(c); } catch (IOException e) { throw new RuntimeException(e); } }