@param LoadingContext $context
@param Row[]          $rows

@return ITypedObject[]
353012
public function loadAllObjects(LoadingContext $context, array $rows) : array
    {
        $objects = [];

        foreach ($rows as $key => $row) {
            $objects[$key] = $this->constructNewObjectFromRow($row);
        }

        $this->loadAll($context, $objects, $rows);

        return $objects;
    }
798967
public function loadVersionedNameData($rows)
    {
        try {
            return $this->innerGateway->loadVersionedNameData($rows);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
548469
public function createRows(array $rows): array
    {
        $list = [];
        foreach ($rows as $key => $row) {
            // Create new file and save it.
            $key = $this->getNewKey();
            $path = $this->getPathFromKey($key);
            $file = $this->getFile($path);
            $list[$key] = $this->saveFile($file, $row);
        }

        return $list;
    }
701403
public function persistObject(PersistenceContext $context, ITypedObject $object) : \Dms\Core\Persistence\Db\Row
    {
        return $this->persistAllObjects($context, [0 => $object])[0];
    }
777014
public function populate($rows)
    {
        $indexBy = $this->indexBy;

        if ($indexBy === null) {
            return $this->createObjects($rows);
        }
        $result = [];
        foreach ($rows as $row) {
            if (is_string($indexBy)) {
                $key = $row[$indexBy];
            } else {
                $key = call_user_func($indexBy, $row);
            }
            $result[$key] = $this->createObject($row);
        }
        return $result;
    }
713444
public function persistAllObjects(PersistenceContext $context, array $objects) : array
    {
        $rows = [];

        foreach ($objects as $key => $object) {
            $rows[$key] = new Row($this->table);
        }

        $this->persistAll($context, $objects, $rows);

        return $rows;
    }
1335170
public function syncRelated(PersistenceContext $context, array $modifiedColumns, array $children) : array
    {
        return $this->bulkUpdateForeignKeys($context, $modifiedColumns, $children);
    }
153925
private function readContextCallees(ContextEnvironment $environment, $contextClass)
    {
        $callees = array();
        foreach ($this->contextReaders as $loader) {
            $callees = array_merge(
                $callees,
                $loader->readContextCallees($environment, $contextClass)
            );
        }

        return $callees;
    }
313183
public TypedDataSet<T> rows(Collection<? extends T> rows) {
    for (T rowObj : rows) {
      super.row(conv.convert(rowObj));
    }
    return this;
  }
1156319
public function batchInsert($rows)
    {
        $insertedIds = $this->db->batchInsert($this->name, $rows);

        foreach ($rows as $key => $row) {
            $rows[$key]['_id'] = $insertedIds[$key];
        }

        return $rows;
    }
284931
protected function loadFromRows(array $rows, $typeIdentifier, $status)
    {
        $types = $this->mapper->extractTypesFromRows($rows);
        if (count($types) !== 1) {
            throw new Exception\TypeNotFound($typeIdentifier, $status);
        }

        return $types[0];
    }
1109953
public function load(string $type, string $context, $contextId = null, array $options = null)
    {
        $user = null;
        if ($this->tokenStorage->getToken()->getUser() instanceof User) {
            $user = $this->tokenStorage->getToken()->getUser();
        }

        $workspace = null;
        if (DataSource::CONTEXT_WORKSPACE === $context) {
            $workspace = $this->om
                ->getRepository(Workspace::class)
                ->findOneBy(['uuid' => $contextId]);
        }

        /** @var GetDataEvent $event */
        $event = $this->eventDispatcher->dispatch(
            'data_source.'.$type.'.load',
            GetDataEvent::class,
            [$context, $options, $user, $workspace]
        );

        return $event->getData();
    }
1155767
public List<UIContext> getRowContexts() {
		List<?> beanList = this.getBeanList();
		List<UIContext> contexts = new ArrayList<>(beanList.size());

		for (int i = 0; i < beanList.size(); i++) {
			Object rowData = beanList.get(i);
			contexts.add(this.getRowContext(rowData, i));
		}

		return Collections.unmodifiableList(contexts);
	}
118510
private function resolveTypedArray($type, Context $context)
    {
        return new Array_($this->resolveSingleType(substr($type, 0, -2), $context));
    }
1318631
public function load(LoadingContext $context) : array
    {
        $rows      = $context->query($this->select)->getRows();
        $data      = [];

        foreach ($this->columnIndexMap as $columnName => $index) {
            foreach ($rows as $key => $row) {
                $data[$key][$index] = $row->getColumn($columnName);
            }
        }

        foreach ($this->relationsToLoad as $index => list($relation, $parentTable, $parentColumnMap)) {
            /** @var Table $parentTable */
            if ($relation instanceof IToOneRelation) {
                $map       = new ParentChildMap($parentTable->getPrimaryKeyColumnName());
                $rowKeyMap = new \SplObjectStorage();

                foreach ($rows as  $key => $row) {
                    $mappedColumnData = [];
                    $originalColumnData = $row->getColumnData();

                    foreach($parentColumnMap as $original => $mapped) {
                        $mappedColumnData[$mapped] = $originalColumnData[$original];
                    }

                    $mappedRow = new Row($parentTable, $mappedColumnData);

                    $map->add($mappedRow, null);
                    $rowKeyMap[$mappedRow] = $key;
                }

                $relation->load($context, $map);

                foreach ($map->getItems() as $item) {
                    $data[$rowKeyMap[$item->getParent()]][$index] = $item->getChild();
                }
            } elseif ($relation instanceof IToManyRelation) {
                $map = new ParentChildrenMap($parentTable->getPrimaryKeyColumnName());
                $rowKeyMap = new \SplObjectStorage();

                foreach ($rows as $key => $row) {
                    $mappedColumnData = [];
                    $originalColumnData = $row->getColumnData();

                    foreach($parentColumnMap as $original => $mapped) {
                        $mappedColumnData[$mapped] = $originalColumnData[$original];
                    }

                    $mappedRow = new Row($parentTable, $mappedColumnData);

                    $map->add($mappedRow, []);
                    $rowKeyMap[$mappedRow] = $key;
                }

                $relation->load($context, $map);

                foreach ($map->getItems() as $item) {
                    $data[$rowKeyMap[$item->getParent()]][$index] = $relation->buildCollection($item->getChildren());
                }
            }
        }

        return $data;
    }
129221
public function load(LoadingContext $context, ParentChildMap $map)
    {
        if (!$map->getItems()) {
            return;
        }
        
        $select = $this->getRelationSelectFromParentRows($map, $parentIdColumnName);

        $this->loadFromSelect($context, $map, $select, $select->getTableAlias(), $parentIdColumnName);
    }
551446
protected function createObjects($rows)
    {
        $models = [];

        foreach ($rows as $key => $row) {
            $models[$key] = $this->createObject($row);
        }

        return $models;
    }