Sets default repository class.

@throws ORMException If not is a \Doctrine\Common\Persistence\ObjectRepository implementation.
167846
public function setDefaultRepositoryClassName(string $repositoryClassName) : void
    {
        $reflectionClass = new ReflectionClass($repositoryClassName);

        if (! $reflectionClass->implementsInterface(ObjectRepository::class)) {
            throw InvalidEntityRepository::fromClassName($repositoryClassName);
        }

        $this->defaultRepositoryClassName = $repositoryClassName;
    }
27192
public function getRepository()
    {
        if (null == $this->repository) {
            $this->setRepository(
                Orm::getRepository($this->getEntityClassName())
            );
        }
        return $this->repository;
    }
495691
public function initializeObject()
    {
        $this->defaultQuerySettings = $this->objectManager->get(Typo3QuerySettings::class);
        $this->defaultQuerySettings->setRespectStoragePage(false);
    }
1152148
public function setEntityManager(EntityManagerInterface $em)
    {
        $this->em = $em;
        // Because these repositories are shared between the different functions it's
        // easier to make them available in the class.
        $this->pagePartRepo = $em->getRepository('KunstmaanPagePartBundle:PagePartRef');
        $this->translationRepo = $em->getRepository('KunstmaanNodeBundle:NodeTranslation');
        $this->nodeRepo = $em->getRepository('KunstmaanNodeBundle:Node');
    }
510975
protected function initializeModelRepository()
    {
        /** @var ModelRepositoryFactoryInterface $factory */
        $factory = app(ModelRepositoryFactoryInterface::class);

        $this->modelRepository = $factory->make($this->modelInformation->modelClass());

        $this->applyRepositoryContext();

        return $this;
    }
987091
public function setDefaultRepositoryClassName($className)
    {
        $reflectionClass = new \ReflectionClass($className);

        if (!$reflectionClass->implementsInterface(ObjectRepository::class)) {
            throw PHPCRException::invalidDocumentRepository($className);
        }

        $this->attributes['defaultRepositoryClassName'] = $className;
    }
159052
public function setDefaultResultType($resultType)
    {
        if (defined('self::RESULT_' . strtoupper($resultType))) {
            $this->defaultResultType = constant('self::RESULT_' . strtoupper($resultType));
        }

        return $this;
    }
1029092
public function initializeDefaultAliases()
    {
        foreach ($this->defaultAliases as $def => $entityClass) {
            $table = $this->namingStrategy->classToTableName($entityClass);
            $this->defaultAliases[$table] = $entityClass;
        }

        foreach ($this->aliases as $prefixed) {
            $entity = isset($this->defaultAliases[$prefixed]) ? $this->defaultAliases[$prefixed] : null;
            if ($entity !== null) {
                $this->setDefaultAlias($prefixed, $entity);
            }
        }
    }
1080377
public synchronized final void initialize() throws RepositoryException {
        if (!initialized) {
            try {
                doInitialize();
                initialized = true;
            } catch (RuntimeException e) {
                throw new RepositoryException(e);
            }
        }
    }
41738
private function initialize()
    {
        $adapter = $this->getAdapter();
        if (($adapter instanceof AdapterInterface) === false) {
            throw new InvalidArgumentException(sprintf('No adapter found to handle VCS repository "%s".', $this->repositoryUrl));
        }

        $this->repositoryAdapter = $adapter;
    }
152035
@Override
	public void init() {
		RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension();
		RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

		registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
	}
168678
public function setRepositories($repositories)
    {
        if (!is_array($repositories) && (!is_object($repositories) || !$repositories instanceof \Traversable)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid argument provided for $repositories, expecting either an array or Traversable object, but' .
                ' "%s" given',
                is_object($repositories) ? get_class($repositories) : gettype($repositories)
            ));
        }
        $this->stack = new \SplStack();
        $this->addRepositories($repositories);
    }
308561
public function addRepository($name, Repository $model, callable $handler = null, $default = null)
    {
        // B/C
        if (is_bool($handler)) {
            $default = $handler;
        } elseif (is_callable($handler)) {
            $handler($model, $this);
        }

        $this->repository->setRepository($model, $default, $name);

        return $this;
    }
1190067
public function setRepository(Repository $repository, $default = null, $customName = null)
    {
        if ($default === true) {
            $this->repository = $repository;
        }

        $name = $customName ?: $repository->getName();
        $name = $name ?: uniqid();

        $this->repositories[strtolower($name)] = $repository;

        return $this;
    }
755170
public final function setEntityClass($str_class)
    {
        if(class_exists($str_class)) {
            if(is_a($str_class, '\\GDS\\Entity', TRUE)) {
                $this->str_entity_class = $str_class;
            } else {
                throw new \InvalidArgumentException('Cannot set an Entity class that does not extend "GDS\Entity": ' . $str_class);
            }
        } else {
            throw new \InvalidArgumentException('Cannot set missing Entity class: ' . $str_class);
        }
        return $this;
    }
323395
private void setRepositoryMapFile() throws MojoExecutionException {
        if (this.customRepositoryMap != null && !this.customRepositoryMap.isEmpty()) {
            File repositoryMap = getRepositoryMapFile(this.customRepositoryMap);
            if (repositoryMap.exists()) {
                checkRepositoryMapIsValid(repositoryMap);
                try {
                    this.xmlRepositoryMap = repositoryMap.toURI().toURL().openStream();
                } catch (IOException ioe) {
                    throw new MojoExecutionException(ioe.getLocalizedMessage());
                }
            } else {
                throw new MojoExecutionException("Repository map '" + repositoryMap.getAbsolutePath() + "' does not exist");
            }
        }

        if (this.xmlRepositoryMap == null) {
            this.xmlRepositoryMap = this.getClass().getResourceAsStream("/RepositoryMap.xml");
        }
    }
1327195
protected function setEntity($entityClass)
    {
        $this->repos = $this->doctrine->getRepository($entityClass);
        $this->className = $this->repos->getClassName();
        $this->classMetaData = $this->metadataFactory->getMetadataForClass($this->className);
    }