@param $criteriaAlias

@return bool
173622
public function hasCriteriaNamed($criteriaAlias)
    {
        return $this->criterias->exists(function ($key, Criteria $element) use ($criteriaAlias) {
            return $criteriaAlias === $element->getName();
        });
    }
1122940
public function withFacades($aliases = true, $userAliases = [])
    {
        Facade::setFacadeApplication($this);

        if ($aliases) {
            $this->withAliases($userAliases);
        }
    }
1181997
public function applyFilter(Criteria $criteria, $filter)
    {
        if (is_string($filter) && is_string($this->property)) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter)
            );
        }

        if (is_array($filter) && isset($filter[$this->searchKey])) {
            $criteria->andWhere(
                $criteria->expr()->contains($this->property, $filter[$this->searchKey])
            );
        }

        return $criteria;
    }
1311899
private static function mapRootAliases(array $rootAliases, array $rootEntities): array
    {
        $aliasMap = array_combine($rootAliases, $rootEntities);
        if (false === $aliasMap) {
            throw new \LogicException('Number of root aliases and root entities do not match.');
        }

        return $aliasMap;
    }
588936
public function getURI(array $criteria)
    {
        $uris = $this->getURIs($criteria);

        return $uris->count() > 0
            ? $uris->first()
            : false;
    }
666476
public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof \Atos\Model\AtosCurrencyQuery) {
            return $criteria;
        }
        $query = new \Atos\Model\AtosCurrencyQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }
841918
public function resolved($abstract)
    {
        $abstract = $this->normalize($abstract);
        if ($this->isAlias($abstract)) {
            $abstract = $this->getAlias($abstract);
        }
        return isset($this->resoleved[$abstract]) || isset($this->instances[$abstract]);
    }
573365
public static function hasAlias(string $alias): bool
    {
        // empty OR not an alias
        if (!$alias || $alias[0] !== '@') {
            return false;
        }

        return isset(self::$aliases[$alias]);
    }
1014953
private function hasJoin(ProxyQueryInterface $queryBuilder, $alias)
    {
        $joins = $queryBuilder->getDQLPart('join');

        if (!isset($joins[$alias])) {
            return false;
        }

        foreach ($joins[$alias] as $join) {
            if ('trans' === $join->getAlias()) {
                return true;
            }
        }

        return false;
    }
1149559
public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof UserQuery) {
            return $criteria;
        }
        $query = new UserQuery(null, null, $modelAlias);

        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }
552727
public function removeAlias($alias)
    {
        if (isset($this->aliases[$alias])) {
            unset($this->aliases[$alias]);
            return true;
        }

        return false;
    }
854769
public function applyToCriteriaComparator(CriteriaComparator $criteriaComparator, CriteriaProperty $alias) {
		$criteriaComparator->match(CrIt::p($alias, $this->cp), $this->operator, $this->ci);
	}
445919
public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof \CustomerGroup\Model\CustomerCustomerGroupQuery) {
            return $criteria;
        }
        $query = new \CustomerGroup\Model\CustomerCustomerGroupQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }
317239
public function countCustomerCustomerGroups(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collCustomerCustomerGroupsPartial && !$this->isNew();
        if (null === $this->collCustomerCustomerGroups || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collCustomerCustomerGroups) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getCustomerCustomerGroups());
            }

            $query = ChildCustomerCustomerGroupQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByCustomerGroup($this)
                ->count($con);
        }

        return count($this->collCustomerCustomerGroups);
    }
430129
public function getGroupBy(Criteria $criteria)
    {
        $groupBy = $criteria->getGroupByColumns();

        if ($groupBy) {
            // check if all selected columns are groupBy'ed.
            $selected = $this->getPlainSelectedColumns($criteria);
            $asSelects = $criteria->getAsColumns();

            foreach ($selected as $colName) {
                if (!in_array($colName, $groupBy)) {

                    // is a alias there that is grouped?
                    if ($alias = array_search($colName, $asSelects)) {
                        if (in_array($alias, $groupBy)) {
                            continue; //yes, alias is selected.
                        }
                    }
                    $groupBy[] = $colName;
                }
            }

            if ($groupBy) {
                return ' GROUP BY ' . implode(',', $groupBy);
            }
        }

        return '';
    }
86828
public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof \Dealer\Model\DealerAdminQuery) {
            return $criteria;
        }
        $query = new \Dealer\Model\DealerAdminQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }
667243
public function countPermissionsRelatedById(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null)
    {
        $partial = $this->collPermissionsRelatedByIdPartial && !$this->isNew();
        if (null === $this->collPermissionsRelatedById || null !== $criteria || $partial) {
            if ($this->isNew() && null === $this->collPermissionsRelatedById) {
                return 0;
            }

            if ($partial && !$criteria) {
                return count($this->getPermissionsRelatedById());
            }

            $query = ChildPermissionQuery::create(null, $criteria);
            if ($distinct) {
                $query->distinct();
            }

            return $query
                ->filterByPermissionRelatedByParentId($this)
                ->count($con);
        }

        return count($this->collPermissionsRelatedById);
    }