Sets read one operation

@param string $entityName

@return ReadQueryInterface
18914
public function readOne($entityName)
    {
        return new ReadOneQuery(
            $this->connection,
            $this->models->get($entityName),
            $this->factory,
            $this->accessor,
            $this->dispatcher
        );
    }
1068011
private function readDefinition($entityName)
    {
        $this->getDispatcher()->dispatch('onCreateDefinition', new CreateDefinitionEvent($entityName, $this));

        $entity          = new Entity;
        $this->reflector = new EntityReflector($entity);
        $filename        = $this->locateDescription($entityName);
        $definition      = $this->parseDescription($filename, $entityName);
        $this->reflector->setDefinition($definition);
        $this->entities[$definition->class] = $entity;

        $this->alias[$definition->name] = $definition->class;

        $this->setIdAccessors($definition->class, $entity->key());

        $this->getDispatcher()->dispatch(
            'onDefinitionCreated',
            new DefinitionCreatedEvent($definition->class, $definition, $this)
        );

        return $definition->class;
    }
860890
public function entityHasTranslation(string $entityName): bool
    {
        $hasKey = in_array($entityName, $this->translationModelKeys());

        if ($hasKey) {
            return ! empty($hasKey);
        }

        return false;
    }
646477
public function find($entityName, $identifier, $lockMode = LockMode::NONE, $lockVersion = null)
    {
        return $this->getRepository($entityName)->find($identifier, $lockMode, $lockVersion);
    }
385609
public function setCollectionName(string $collectionName)
    {
        if ($this->nested) {
            throw new LogicException(
                sprintf(
                    'Collection name cannot be set for nested document class "%s".',
                    $this->documentClass
                )
            );
        }

        $this->collectionName = $collectionName;

        return $this;
    }
173902
function getRepository($entityName)
    {
        if (isset($this->cachedRepository[$entityName])) {
            return $this->cachedRepository[$entityName];
        }
        $className = "Fredy\\Model\\Repository\\Repository";
        $entityClassName = 'Model\\Entity\\'.$entityName;
        return new $className(new $entityClassName(),$this->db);
    }
665742
public function getManager($entityName)
    {
    	$entityName = ltrim($entityName, '\\');

    	if (isset($this->repositories[$entityName])) {
    		return $this->repositories[$entityName];
    	}
    	$repositoryClassName = ltrim($entityName::MANAGER_CLASS_NAME, '\\');

    	$repository = new $repositoryClassName($this,$entityName);

    	$this->repositories[$entityName] = $repository;

    	return $repository;
    }
1325114
public function setEntity($entity_name, $entity_alias)
    {
        $this->entity_name  = $entity_name;
        $this->entity_alias = $entity_alias;
        $this->queryBuilder->from($entity_name, $entity_alias);
        return $this;
    }
955026
public function clear($entityName = null)
    {
        if ($entityName === null) {
            $this->identityMap =
            $this->entityIdentifiers =
            $this->originalEntityData =
            $this->entityChangeSets =
            $this->entityStates =
            $this->scheduledForSynchronization =
            $this->entityInsertions =
            $this->entityUpdates =
            $this->entityDeletions =
            $this->collectionDeletions =
            $this->collectionUpdates =
            $this->extraUpdates =
            $this->readOnlyObjects =
            $this->visitedCollections =
            $this->orphanRemovals = array();

            if ($this->commitOrderCalculator !== null) {
                $this->commitOrderCalculator->clear();
            }
        } else {
            $visited = array();

            foreach ($this->identityMap as $className => $entities) {
                if ($className !== $entityName) {
                    continue;
                }

                foreach ($entities as $entity) {
                    $this->doDetach($entity, $visited, false);
                }
            }
        }

        if ($this->evm->hasListeners(Events::onClear)) {
            $this->evm->dispatchEvent(Events::onClear, new Event\OnClearEventArgs($this->em, $entityName));
        }
    }
1182493
private function setEntityRepository()
    {
        try {
            $this->_repository = $this->_em->getRepository(self::ENTITY_CLASSNAME);
        } catch (\Exception $e) {
            throw new CacheException('Enable to load the cache entity repository', null, $e);
        }

        return $this;
    }
298438
public function getRepositoryForEntity(string $entityName, string $connectionName = null): AbstractRepository
    {
        /** @var AbstractRepository $repository */
        $repository = $this->loadFactorableInstance($entityName);

        if (is_string($connectionName)) {
            $entityManager = $this->getContainer()->get('doctrine')->getManager($connectionName);
            $repository->setEntityManager($entityManager);
        }

        $this->onFactorableLoaded($repository);

        return $repository;
    }
365397
public function setEntityClassName($name)
    {
        $trimmedName = trim($name, '\\');

        if (!class_exists($trimmedName)) {
            throw new RuntimeException(sprintf('The class "%s" does not exist.', $trimmedName));
        }

        $this->entityClassName = $trimmedName;

        return $this;
    }
882312
public function getNodeByEntityName($entityName)
    {
        if (false !== ($index = array_search($entityName, $this->nodesEntities))) {
            if ($this->offsetExists($index)) {
                return $this->offsetGet($index);
            }
        }

        return false;
    }
215956
public function setObjectName($objectName = null)
    {
        return parent::setObjectName(is_null($objectName) ? ( empty($this->getRecordIdent())
                    ? $this->getObjectName() : $this->getRecordIdent().'@'.$this->getObjectName() )
                    : $objectName);
    }
777453
public function entityTo(string $propertyName)
    {
        $idString = implode(':', [$this->definition->getClassName(), __CLASS__, $this->relationCount++]);
        $this->readDefinition->relation($propertyName)
            ->asCustom(new EmbeddedObjectRelation($idString, new EmbeddedMapperProxy($this->mapper)));
    }
1238948
public function process($itemName, $entityName)
    {
        $inputs = array(
            'itemName' => $itemName,
            'entityName' => $entityName,
        );
        $this->setMethods($inputs);

        $convertedDefs = $this->load($itemName, $entityName);

        $inputs = $this->setArrayValue(null, $inputs);
        $this->setMethods($inputs);

        return $convertedDefs;
    }
616987
public function getEntityBuilder($className = null, ClassMetadata $classMetadata = null)
    {
        $builder = new Entity\Builder($this->getMapper(), $this->getFieldManager());

        if ($className !== null) {
            $builder->setClass($className);
        }

        if ($classMetadata !== null) {
            $builder->setClassMetadata($classMetadata);
        }

        return $builder;
    }