return;
}
// Create an observer for to get the iterated result
// instead of getting each table as a list
IteratedSelectObserver observer = new IteratedSelectObserver();
// Using QueryResult as observer for the data insert.
// This allows to collect query statistics and pass it to the delegate.
QueryResult insertObserver = new QueryResult();
// process ordered list of entities one by one
Iterator it = entities.iterator();
while (it.hasNext()) {
insertObserver.clear();
DbEntity entity = (DbEntity) it.next();
SelectQuery select = new SelectQuery(entity);
select.setFetchingDataRows(true);
// delegate is allowed to substitute query
Query query = (delegate != null) ? delegate.willPortEntity(
this,
entity,
select) : select;
sourceNode.performQueries(Collections.singletonList(query), observer);
ResultIterator result = observer.getResultIterator();
InsertBatchQuery insert = new InsertBatchQuery(entity, INSERT_BATCH_SIZE);
try {
// Split insertions into the same table into batches.