code: private List<DBEntity> collectUninitializedEntities(DBEntity entity, final String category,
  			final TableDefinition tableDef, final List<String> fields, final String link, final Map<ObjectID, LinkList> cache, final Set<ObjectID> keys,
  			final DBEntitySequenceOptions options) {
  
  		DBEntityCollector collector = new DBEntityCollector(entity) {
  			@Override
  			protected boolean visit(DBEntity entity, List<DBEntity> list){
  				if (entity.findIterator(category) == null) {
  					ObjectID id = entity.id();
  					LinkList columns = cache.get(id);
  					if (columns == null) {
  						keys.add(id);
  						list.add(entity);
  						return (keys.size() < options.initialLinkBufferDimension);
  					}
  					DBLinkIterator linkIterator = new DBLinkIterator(entity, link, columns, m_options.linkBuffer,
  							DBEntitySequenceFactory.this, category);
  					entity.addIterator(category, new DBEntityIterator(tableDef, entity, linkIterator, fields, DBEntitySequenceFactory.this, category, m_options));
  				}
  				return true;
  			}
  		};
  		return collector.collect();
  	}
docs: Collects the entities to be initialized with the initial list of links using the link list bulk fetch.
  Visits all the entities buffered by the iterators of the same category.
  
  @param entity   next entity to be returned by the iterator (must be initialized first)
  @param category the iterator category that will return the linked entities
  @param tableDef type of the linked entities
  @param fields   scalar fields to be fetched by the linked entities iterators
  @param link     link name
  @param cache    link list cache. If the cache contains the requested link list, the visited entity is initialized with the cached list and skipped
  @param keys     set of 'rows' to be fetched. The set will be filled by this method
  @param options  limits the number of rows to be fetched
  @return         list of entities to be initialized.
  The set of physical rows to be fetched is returned in the 'keys' set.
  The set size can less than the list size if the list contains duplicates