<commit_before><?php

namespace Lists\LookupBundle\Entity;

use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;

/**
 * LookupRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class LookupRepository extends EntityRepository
{
    const KEY__SCOPE = 'scope';
    const KEY__DOGOVOR = 'dogovor';
    const KEY__ORGANIZATION_SIGN_COMPETITOR = 'organization_sign_competitor';

    /**
     * Returns choices for scope
     *
     * @return Query
     */
    public function getOnlyScopeQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__SCOPE);
    }

    /**
     * Returns choices for dogovor_type
     *
     * @return Query
     */
    public function getOnlyDogovorTypeQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__DOGOVOR);
    }

    /**
     * Returns choices for competitor
     *
     * @return QueryBuilder
     */
    public function getOnlyCompetitorQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__ORGANIZATION_SIGN_COMPETITOR);
    }

    /**
     * Get lookup by lukey
     *
     * @param string $lukey
     *
     * @return \Doctrine\ORM\QueryBuilder
     */
    public function getLookupByLukeyQuery($lukey)
    {
        $query = $this->createQueryBuilder('l')
            ->where('l.lukey = :lukey')
            ->setParameter(':lukey', $lukey);

        return $query;
    }

    /**
     * Returns first id of collection
     *
     * @param string $lukey
     *
     * @return int|null
     */
    public function getFirstIdByLukey($lukey)<commit_msg>task-602<commit_after><?php

namespace Lists\LookupBundle\Entity;

use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query;

/**
 * LookupRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class LookupRepository extends EntityRepository
{
    const KEY__SCOPE = 'scope';
    const KEY__DOGOVOR = 'dogovor';
    const KEY__ORGANIZATION_SIGN_COMPETITOR = 'organization_sign_competitor';

    /**
     * Returns choices for scope
     *
     * @return Query
     */
    public function getOnlyScopeQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__SCOPE);
    }

    /**
     * Returns choices for dogovor_type
     *
     * @return Query
     */
    public function getOnlyDogovorTypeQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__DOGOVOR);
    }

    /**
     * Returns choices for competitor
     *
     * @return QueryBuilder
     */
    public function getOnlyCompetitorQuery()
    {
        return $this->getLookupByLukeyQuery(self::KEY__ORGANIZATION_SIGN_COMPETITOR);
    }

    /**
     * Get lookup by lukey
     *
     * @param string $lukey
     *
     * @return \Doctrine\ORM\QueryBuilder
     */
    public function getLookupByLukeyQuery($lukey)
    {
        $query = $this->createQueryBuilder('l')
            ->where('l.lukey = :lukey')
            ->setParameter(':lukey', $lukey)
            ->orderBy('l.name');

        return $query;
    }

    /**
     * Returns first id of collection
     *
     * @param string $lukey
     *
     * @return int|null
     */
    public function getFirstIdByLukey($lukey)
{'fraction_non_alphanumeric': 0.10643928256395178, 'fraction_numerical': 0.0008820935019112026, 'mean_word_length': 2.5400624349635796, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3949016', 'n_tokens_mistral': 1071, 'n_tokens_neox': 1045, 'n_words': 212}