use of com.tvd12.dahlia.core.storage.CollectionStorage in project dahlia by youngmonkeys.
the class DahliaCoreLoader method loadCollection.
protected void loadCollection(Collection collection, CollectionStorage storage) {
CollectionSetting setting = collection.getSetting();
FieldSetting idSetting = setting.getId();
long recordPosition = collection.getDataSize();
while (storage.hasMoreRecords(recordPosition)) {
Record record = storage.readRecord(recordPosition, idSetting);
if (record != null)
collection.insert(record);
recordPosition = collection.increaseDataSize();
}
}
Aggregations