@inheritdoc

@throws RepositoryException
433161
public function readRedirectUriStrings(string $identifier): array
    {
        try {
            $schema = $this->getDatabaseSchema();
            return $this->readHasManyRelationshipColumn(
                $identifier,
                $schema->getRedirectUrisTable(),
                $schema->getRedirectUrisValueColumn(),
                $schema->getRedirectUrisClientIdentityColumn()
            );
        } catch (RepositoryException $exception) {
            $message = 'Reading client redirect URIs failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }
236390
public function read(int $identifier): ?TokenInterface
    {
        try {
            return $this->readResource($identifier);
        } catch (RepositoryException $exception) {
            $message = 'Token reading failed.';
            throw new RepositoryException($message, 0, $exception);
        }
    }
470153
private void load() throws RepositoryException
   {
      //Namespaces first
      NamespaceDataPersister namespacePersister =
         (NamespaceDataPersister)this.getComponentInstanceOfType(NamespaceDataPersister.class);
      NamespaceRegistryImpl nsRegistry = (NamespaceRegistryImpl)getNamespaceRegistry();

      namespacePersister.start();
      nsRegistry.start();

      //Node types now.
      JCRNodeTypeDataPersister nodeTypePersister =
         (JCRNodeTypeDataPersister)this.getComponentInstanceOfType(JCRNodeTypeDataPersister.class);

      NodeTypeDataManagerImpl ntManager =
         (NodeTypeDataManagerImpl)this.getComponentInstanceOfType(NodeTypeDataManagerImpl.class);

      nodeTypePersister.start();
      ntManager.start();

   }
485802
void migrate() throws RepositoryException
   {
      try
      {
         LOG.info("Migration started.");

         moveOldStructure();
         service.createStructure();

         //Migration order is important due to removal of nodes.
         migrateGroups();
         migrateMembershipTypes();
         migrateUsers();
         migrateProfiles();
         migrateMemberships();

         removeOldStructure();

         LOG.info("Migration completed.");
      }
      catch (Exception e)//NOSONAR
      {
         throw new RepositoryException("Migration failed", e);
      }
   }
394678
public function findByMethod($method, array $columns = ['*'])
    {
        $this->applyCriteria();

        $result = $this->model->{$method}($columns);

        if ( ! $result )
            throw new RepositoryException("Method {{$method}} does not exist on the model.");

        return $result;
    }
469776
public function insert(Repository $repository = null)
    {
        if (!$repository) {
            $repository = $this->getRepository();
        }

        $repository = $repository->aliased('write');

        $insert = $this->getQuery()->transformToInsert();

        $prepare = $repository->prepareQuery($insert);

        return $repository->executePrepared($prepare);
    }
509960
public function setUp(
        $entityClass,
        array $entityProperties,
        $collectionClass,
        RepositoryInterface $entityRepository = null
    ) {
        @trigger_error(__METHOD__.'() is deprecated and will be removed in 2.0. Please use configureMetadata() instead.', E_USER_DEPRECATED);

        if ($entityRepository) {
            @trigger_error('Repository injection throught '.__METHOD__.'() is deprecated and will be removed in 2.0. Please inject it by constructor.', E_USER_DEPRECATED);

            $this->entityRepository = $entityRepository;
        }

        return $this->configureMetadata($entityClass, $entityProperties, $collectionClass);
    }
912181
public Object accept(QueryNodeVisitor visitor, Object data) throws RepositoryException {
        return visitor.visit(this, data);
    }
665069
protected function doCanFilterWithRepository(
        Collection $collection,
        Repository $repository
    ){
        /**
         * @var Filter[] $filters
         */
        $filters = $this->getFilters();

        foreach ($filters as $filter) {
            if (!$filter->canFilterWithRepository($collection, $repository)){
                return false;
            }
        }

        return true;
    }
1129907
public function getRepository(string $className): AbstractObjectRepository
    {
        $className = 'Infakt\\Repository\\'.substr($className, strrpos($className, '\\') + 1).'Repository';

        if (!class_exists($className)) {
            throw new LogicException("There is no repository to work with class $className.");
        }

        return new $className($this);
    }
135291
public function write($data)
    {
        if (empty($this->filename)) {
            Throw new RepositoryException(sprintf('There is no filename set for %s', __CLASS__));
        }

        try {
            file_put_contents($this->filename, 'return ' . var_export($data, true));
        }
        catch (\Throwable $t) {
            Throw new RepositoryException($t->getMessage(), $t->getCode());
        }
    }
240522
public function execute($repositoryUrl)
    {
        $this->arguments[] = $repositoryUrl;
        $this->arguments[] = $this->repository->getRepositoryPath();
        return $this->run();
    }
754670
public function handle(DocumentRepository $repository)
    {
        $className = $repository->getClassName();
        if (isset($this->restrictedFieldMap[$className]) && !empty($this->restrictedFieldMap[$className])) {
            $nodes = [];
            foreach ($this->restrictedFieldMap[$className] as $fieldPath => $handlers) {
                $nodes = array_merge(
                    $nodes,
                    $this->getHandlerValue($repository, $fieldPath, $handlers)
                );
            }
            return new AndNode($nodes);
        }
        return false;
    }
347614
public function update($id, array $data)
    {
        $model = $this->find($id);

        if (!$model) {
            throw new RepositoryException("O item não solicitado não existe.");
        }

        $model->fill($data);

        $model->update();

        return $this->find($id);

    }
473522
public function addRepository(RepositoryInterface $repository)
    {
        if ($repository instanceof IssueRepository) {
            $type = 'issue';
        } else {
            throw new \Exception('Unknown repository type.');
        }

        $this->repositories[$type] = $repository;
    }
706652
protected function doCanFilterWithRepository(Collection $collection, Repository $repository)
    {
        if ($this instanceof ColumnFilter) {
            return self::canFilter($collection, $repository, $this->getColumnName());
        }

        return false;
    }
969997
protected function getQueryBuilder($repositoryMethod)
    {
        $repository = $this
            ->getDriver()
            ->getDoctrineOrmEm()
            ->getRepository($this->getDriver()->getEntityFqn())
        ;

        $repositoryMethods = $this->getDriver()->getEntityRepositorySearchableMethods();

        if (!method_exists($repository, $repositoryMethods[$repositoryMethod])) {
            return $repository->createQueryBuilder($this->getDriver()->getEntityAlias());
        }

        $queryBuilder = $repository->{$repositoryMethods[$repositoryMethod]}();

        if (!$queryBuilder instanceof QueryBuilder) {
            throw new ResourceException(sprintf(
                'The method "%s" of repository class must be return a %s instance',
                $repositoryMethods[$repositoryMethod],
                '\Doctrine\ORM\QueryBuilder'
            ));
        }

        return $queryBuilder;
    }