public CachedObject getNewCachedObject(Session session, Object object) {
int id = rowIdSequence++;
if (isCached) {
Row row = new RowAVLDisk(table, (Object[]) object);
add(row);
if (isTempTable) {
RowAction.addInsertAction(session, (Table) table, row);
}
return row;
} else {
memoryRowCount++;
if (useCache && memoryRowCount > maxMemoryRowCount) {
changeToDiskTable();
return getNewCachedObject(session, object);
}
Row row = new RowAVL(table, (Object[]) object, id);
if (isTempTable) {
RowAction action = new RowAction(session, table,
RowAction.ACTION_INSERT, row,
null);