@param Criteria $criteria
@param          $field
@param          $value

@return $this
964391
protected function processEqualFilter(Criteria $criteria, $field, $value)
    {
        if (is_string($value)) {
            $criteria->andWhere(
                $criteria->expr()->eq($field, $value)
            );
        }

        return $this;
    }
294543
public function lookAt($value, $field)
    {
        $this->value = $value;
        $this->field = $field;
        return $this;

    }
837459
public function increment(string $field, $value)
    {
        $this->update();
        $this->mongoDbUpdate['$inc'][$field] = $value;

        return $this;
    }
981902
public function check($field, $value = null)
    {
        $element = $this->resolver->resolveForChecking($field, $value);

        if (! $element->isSelected()) {
            $element->click();
        }

        return $this;
    }
1124937
public function orWhere($field, $value)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->orWhere($field, $value);
        return $this;
    }
626884
public function set($field, $value) {
        $parser = $this->getParser($field);
        $this->_properties[$field] = $parser->parse($value);
        return $this;
    }
316721
protected function setAsBoolean($field, $value)
    {
        if (in_array($field, $this->getColumns()) && (
                !array_key_exists($field, $this->object) ||
                $this->object[$field] !== $value
            )) {
            $this->dirtyFields[$field] = true;
        }
        $this->object[$field] = (bool) $value;

        return $this;
    }
373424
public function where($column, $value = '', $operator = Criterion::EQUALS, $variable = null, $additional = null, $special = null): Criteria
        {
            if (!$column instanceof Criteria) {
                $criteria = new Criteria();
                $criteria->where($column, $value, $operator, $variable, $additional, $special);
                $column = $criteria;
            }

            $column->setQuery($this);
            $this->criteria[] = $column;

            return $column;
        }
932662
public function addCriteria(Criteria $criteria) : void
    {
        if (! $this->isValidFilter($criteria->getOperator())) {
            throw new \RuntimeException(sprintf('Invalid filter provided: %s', $criteria->getOperator()));
        }

        $this->criteria[] = $criteria;
    }
517846
public function orWhere($column, $value, $operator = self::OPERATOR_EQ): self
    {
        $this->criteria($this->where, $column, $value, $operator, self::LOGICAL_OR);

        return $this;
    }
716337
public function filterGt(string $field, $value): self
    {
        $this->filters[] = new IndexQueryFilter($field, IndexQueryFilterOperator::GREATER_THAN(), $value);
        return $this;
    }
727272
public function filterLte(string $field, $value): self
    {
        $this->filters[] = new IndexQueryFilter($field, IndexQueryFilterOperator::LESS_THAN_OR_EQUAL_TO(), $value);
        return $this;
    }
277808
public function find($criteria = [], array $fields = []) {
		$criteriaNormalized = $this->normalizeCriteria($criteria);
		
		$mongoCursor = $this->getAdapter()->find(
			$this->getTableName(),
			$criteriaNormalized,
			$fields
		);
		
		if ($criteria instanceof Criteria) {
			$this->applyCriteriaToCursor($criteria, $mongoCursor);
		}
		
		return $this->createResultset($mongoCursor);
	}
943508
public function addOr($value , $operator = null) {
        
        /*@var $criterion QueryCriterionInterface */
        $criterion = end($this->storedQueryCriteria);
        $criterion->addOr($value, $operator);
        return $this;
    }
1245685
protected function createSelectQuery(array $fields = [], array $criteria = [], array $orderBy = [], $distinct = true)
	{
		if ($this->objectManager instanceof \Doctrine\ORM\EntityManager) {
			/** @var \Doctrine\ORM\QueryBuilder $builder */
			$builder = $this->objectManager->createQueryBuilder();
			$builder->select(empty($fields) ? 'p' : 'p.' . implode(', p.', $fields));
			
			if (true === $distinct) {
				$builder->distinct();
			}
			
			$builder->from($this->className, 'p')
					->setFirstResult($this->getItemOffset())
					->setMaxResults($this->itemPerPage);
			
			foreach ($orderBy as $key => $value) {
				$builder->orderBy(sprintf('p.%s', $key), $value);
			}
		} elseif ($this->objectManager instanceof \Doctrine\ODM\MongoDB\DocumentManager) {
			/** @var \Doctrine\ODM\MongoDB\Query\Builder $builder */
			$builder = $this->objectManager->createQueryBuilder($this->className);
			
			if (false === empty($fields)) {
				$builder->select($fields);
			}
			
			$builder->skip($this->getItemOffset())
					->limit($this->itemPerPage);
			
			foreach ($orderBy as $key => $value) {
				$builder->sort($key, $value);
			}
		} else {
			throw new ObjectManagerNotSupportedException(sprintf('Doctrine object manager class "%s" is not supported.', get_class($this->objectManager)));
		}
		
		$this->qbHandler->applyExprFromArray($builder, 'p', $criteria);
		
		return $builder->getQuery();
	}
907817
public function where($field, $value, $comparison = '==', $logical = 'and')
    {
        $this->conditions[] = [$field, $value, $comparison, $logical];

        return $this;
    }
1051120
protected function applyCriteriaToCursor(Criteria $criteria, MongoCursor $mongoCursor) {
		$sort   = $criteria->getSortConditions();
		$offset = $criteria->getOffset();
		$limit  = $criteria->getLimit();
				
		if (! empty($sort)) {
			$mongoCursor->sort($sort);
		}
		
		if ($offset !== null) {
			$mongoCursor->skip($offset);
		}

		if ($limit !== null) {
			$mongoCursor->limit($limit);
		}
	}