// TODO wrong, as it could be that the first field is not part of the root class.
if (numberOfFields > 0) {
tableName = _engine.getInfo()[0].getTableName();
// Load all the fields.
CounterRef counterReference = new CounterRef ();
counterReference.setCounter(count);
counterReference.setTableName(tableName);
for (int i = 0; i < numberOfFields; ++i) {
if (_engine.getInfo()[i].isMulti()) {
counterReference.setCounter(count);
fields[i] = loadMultiField(i, counterReference, fields[i]);
count = counterReference.getCounter();
} else if (isFirst) {
// Non-multi fields have to be done one only once, so this is skipped
// if we have already read the first row.
counterReference.setCounter(count);
fields[i] = loadSingleField(i, counterReference);
count = counterReference.getCounter();
}
}
}
return count;
}