EOFetchSpecification fetchSpec = new EOFetchSpecification(_entityName, qualifier, sortOrderings);
fetchSpec.setIsDeep(true);
NSArray<T> objects;
NSRange range = range(options);
if (range == null) {
objects = editingContext.objectsWithFetchSpecification(fetchSpec);
results = new Results<T>(objects, 0, -1, objects.count());
}
else {
ERXFetchSpecificationBatchIterator batchIterator = new ERXFetchSpecificationBatchIterator(fetchSpec, editingContext, range.length());
objects = batchIterator.batchWithRange(range);
results = new Results<T>(objects, range.location(), range.length(), batchIterator.count());
}
return results;
}