Loads Query for itemMetaData

@param ItemMetaData $itemMetaData
198011
protected function doLoad($itemMetaData)
	{
		$query = $this->newQueryInstance($itemMetaData);
		$databaseMapping = $this->ormDriver->loadDatabaseMapping($itemMetaData);
		$query->mapDatabase($databaseMapping, $itemMetaData->getItemClass(), $itemMetaData->getHitPositions());
		return $query;
	}
885808
public function loadClassMetadata(LoadClassMetadataEventArgs $eventArgs)
    {
        $classMetadata = $eventArgs->getClassMetadata();
        $classMetadata->setTableName($this->prefix . $classMetadata->getTableName());

        //if we use sequences, also prefix the sequence name
        if($classMetadata->isIdGeneratorSequence()) {
        
            $sequenceDefinition = $classMetadata->sequenceGeneratorDefinition;
            $sequenceDefinition['sequenceName'] = $this->prefix . $sequenceDefinition['sequenceName'];

            $classMetadata->setSequenceGeneratorDefinition($sequenceDefinition);
        }

        foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
            if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::MANY_TO_MANY) {
                $mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name'];
                $classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName;
            }
        }
    }
780799
private function validateDatabase(EntityMetadata $metadata)
    {
        $persistence = $metadata->persistence;
        if (false === $metadata->isChildEntity() && (empty($persistence->db) || empty($persistence->collection))) {
            throw MetadataException::invalidMetadata($metadata->type, 'The persistence database and collection names cannot be empty.');
        }
    }
808863
public static function loadValidatorMetadata(ClassMetadata $metadata)
    {
        $metadata->addPropertyConstraint('companyName', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('companyName', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('civility', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('civility', new Assert\Length(array('max' => 4)));

        $metadata->addPropertyConstraint('name', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('name', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('surname', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('surname', new Assert\Length(array('max' => 29)));

        $metadata->addPropertyConstraint('email', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('email', new Assert\Email());

        $metadata->addPropertyConstraint('line0', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('line0', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('line1', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('line1', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('line2', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('line2', new Assert\NotBlank());
        $metadata->addPropertyConstraint('line2', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('line3', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('line3', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('phone', new Assert\Regex(array('pattern' => '/^[0-9]{0,15}$/')));
        $metadata->addPropertyConstraint('mobileNumber', new Assert\Regex(array('pattern' => '/^[0-9]{0,10}$/')));
        $metadata->addPropertyConstraint('doorCode1', new Assert\Regex(array('pattern' => '/^[a-zA-Z0-9]{0,8}$/')));
        $metadata->addPropertyConstraint('doorCode2', new Assert\Regex(array('pattern' => '/^[a-zA-Z0-9]{0,8}$/')));
        $metadata->addPropertyConstraint('interphone', new Assert\Regex(array('pattern' => '/^[a-zA-Z0-9]{0,30}$/')));

        $metadata->addPropertyConstraint('countryCode', new Assert\NotBlank());
        $metadata->addPropertyConstraint('countryCode', new Assert\Regex(array('pattern' => '/^[A-Z]{2}$/')));

        $metadata->addPropertyConstraint('city', new Assert\Type(array('type' => 'string')));
        $metadata->addPropertyConstraint('city', new Assert\NotBlank());
        $metadata->addPropertyConstraint('city', new Assert\Length(array('max' => 35)));

        $metadata->addPropertyConstraint('postalCode', new Assert\NotBlank());
        $metadata->addPropertyConstraint('postalCode', new Assert\Regex(array('pattern' => '/^[a-zA-Z0-9]{5}$/')));
    }
832889
private function freshOrNull(ClassMetadata $classMetadata = null)
    {
        if (null === $classMetadata) {
            return;
        }

        return $this->freshnessValidator->isFresh($classMetadata) ? $classMetadata : null;
    }
1016073
protected function doLoad($itemClass)
	{
		$itemMetaData = $this->newItemMetaDataInstance($itemClass);
		$entityDefinitions = $this->annotationDriver->loadEntityDefinitions($itemClass);
		$itemMetaData->mapEntities($entityDefinitions);
		$hitDefinitions = $this->annotationDriver->loadHitDefinitions($itemClass);
		$itemMetaData->mapHits($hitDefinitions);
		return $itemMetaData;
	}
423493
public function load()
    {
        if ($this->fs->exists($this->filename) === false) {
            return;
        }

        try {
            $data = $this->fs->readFile($this->filename);
        } catch (\Exception $e) {
            $message = sprintf('Error loading the site metadata: %s', $e->getMessage());
            throw new LoadSiteMetadataException($message, 0, $e, $this->filename);
        }

        $this->metadata = json_decode($data, true);

        if (0 < $errorCode = json_last_error()) {
            $this->throwInvalidMetadataException($errorCode);
        }
    }
598715
private function loadCacheMetaData()
    {
        if (isset($this->metaData)) {
            return;
        }

        $metaFile = $this->cacheDirectory . '/cache.meta';
        $this->metaData = array();

        if (file_exists($metaFile)) {
            $this->metaData = unserialize(file_get_contents($metaFile));
        }
    }
22273
public function loadItemsFromQuery($query, array $binds = [], StorableInterface $item = null)
    {
        if ($item !== null) {
            $this->setModel($item);
        }

        $items = [];

        $model = $this->model();
        $dbh   = $this->db();

        $this->logger->debug($query);
        $sth = $dbh->prepare($query);

        // @todo Binds
        if (!empty($binds)) {
            unset($binds);
        }

        $sth->execute();
        $sth->setFetchMode(PDO::FETCH_ASSOC);

        $className = get_class($model);
        while ($objData = $sth->fetch()) {
            $obj = new $className;
            $obj->setFlatData($objData);
            $items[] = $obj;
        }

        return $items;
    }
1019051
public function loadItemData($itemId, int $status): array
    {
        $query = $this->getItemSelectQuery();
        $query->where(
            $query->expr()->eq('id', ':id')
        )
        ->setParameter('id', $itemId, Type::INTEGER);

        $this->applyStatusCondition($query, $status);

        return $query->execute()->fetchAll(PDO::FETCH_ASSOC);
    }
869296
public function loadClassMetadata(LoadClassMetadataEventArgs $event)
    {
        /** @var $metadata \Doctrine\ORM\Mapping\ClassMetadata */
        $metadata = $event->getClassMetadata();

        if ( ! isset($this->entityListeners[$metadata->name])) {
            return;
        }

        foreach ($this->entityListeners[$metadata->name] as $listener) {
            $metadata->addEntityListener($listener['event'], $listener['class'], $listener['method']);
        }

        unset($this->entityListeners[$metadata->name]);
    }
23992
public function addMetaData($itemKey, $itemValue, $itemGroup = null)
    {
        $this->getMetaData()->addItem(
            new PagSeguroMetaDataItem($itemKey, $itemValue, $itemGroup)
        );
    }
768784
private function loadResourceMetadata()
    {
        foreach (get_declared_classes() as $className) {
            if (
                !isset($this->resources[$className]) &&
                is_subclass_of($className, 'Tonic\Resource')
            ) {
                $rm = new ResourceMetadata($className);
                if ($rm->getUri()) {
                    $this->resources[$className] = $rm;
                }
            }
        }
    }
615610
private function getSearchableColumnNames(TableMetadata $tableMetadata): array
    {
        $columnNameList = [];
        foreach ($tableMetadata->getAllColumnMetadata() as $columnMetadata) {
            if ($columnMetadata->isStringType()) {
                $columnNameList[] = $columnMetadata->getColumnName();
            }
        }
        return $columnNameList;
    }
451143
public static function loadValidatorMetadata(ClassMetadata $metadata)
    {
        $metadata->addPropertyConstraint('description', new Assert\NotBlank());
        $metadata->addPropertyConstraint('description', new Assert\Regex(array('pattern' => '/^[ a-zA-Z0-9]{1,64}$/')));

        $metadata->addPropertyConstraint('quantite', new Assert\NotBlank());
        $metadata->addPropertyConstraint('quantite', new Assert\Regex(array('pattern' => '/^[0-9]*$/')));

        $metadata->addPropertyConstraint('poids', new Assert\NotBlank());
        $metadata->addPropertyConstraint('poids', new Assert\Type(array('type' => 'float')));
        $metadata->addPropertyConstraint('poids', new Assert\Range(array('min' => 0, 'max' => 30)));

        $metadata->addPropertyConstraint('valeur', new Assert\NotBlank());
        $metadata->addPropertyConstraint('valeur', new Assert\Type(array('type' => 'float')));
    }
1077053
private function collectDqlConditions(ClassMetadata $metadata, array $allConditions, InputObjectType $typeFields, string $alias): void
    {
        foreach ($allConditions as $conditions) {
            foreach ($conditions as $field => $operators) {
                if ($operators === null) {
                    continue;
                }

                /** @var InputObjectType $typeField */
                $typeField = $typeFields->getField($field)->type;

                foreach ($operators as $operatorName => $operatorArgs) {
                    $operatorField = $typeField->getField($operatorName);

                    /** @var AbstractOperator $operatorType */
                    $operatorType = $operatorField->type;

                    $dqlCondition = $operatorType->getDqlCondition($this->uniqueNameFactory, $metadata, $this->queryBuilder, $alias, $field, $operatorArgs);
                    if ($dqlCondition) {
                        $this->dqlConditions[] = $dqlCondition;
                    }
                }
            }
        }
    }
454097
public function create($itemData, $rewriteIfExist = false)
    {
        $newData = $this->preCreate($itemData, $rewriteIfExist);
        $result = $this->dataStore->create($newData, $rewriteIfExist);

        return $this->postCreate($result, $newData, $rewriteIfExist);
    }