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