bridge/doctrine-phpcr-odm/lib/ExpressionVisitor.php
private function walkComparison(Comparison $comparison, AbstractNode $parentNode)
    {
        $field = $comparison->getField();
        $value = $comparison->getValue();

        switch ($comparison->getComparator()) {
            case Comparison::EQUALS:
                return $parentNode->eq()->field($this->getField($field))->literal($value)->end();

            case Comparison::NOT_EQUALS:
                return $parentNode->neq()->field($this->getField($field))->literal($value)->end();

            case Comparison::LESS_THAN:
                return $parentNode->lt()->field($this->getField($field))->literal($value)->end();

            case Comparison::LESS_THAN_EQUAL:
                return $parentNode->lte()->field($this->getField($field))->literal($value)->end();

            case Comparison::GREATER_THAN:
                return $parentNode->gt()->field($this->getField($field))->literal($value)->end();

            case Comparison::GREATER_THAN_EQUAL:
                return $parentNode->gte()->field($this->getField($field))->literal($value)->end();

            case Comparison::IN:
                return $this->getInConstraint($parentNode, $field, $value);

            case Comparison::NOT_IN:
                $node = $parentNode->not();
                $this->getInConstraint($node, $field, $value);

                return $node->end();

            case Comparison::CONTAINS:
                return $parentNode->like()->field($this->getField($field))->literal($value)->end();

            case Comparison::NOT_CONTAINS:
                return $parentNode->not()->like()->field($this->getField($field))->literal($value)->end()->end();

            case Comparison::NULL:
                return $parentNode->not()->fieldIsset($this->getField($field))->end();

            case Comparison::NOT_NULL:
                return $parentNode->fieldIsset($this->getField($field));
        }

        throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator());
    }
private function walkComparison(Comparison $comparison, AbstractNode $parentNode)
    {
        $field = $comparison->getField();
        $value = $comparison->getValue();

        switch ($comparison->getComparator()) {
            case Comparison::EQUALS:
                return $parentNode->eq()->field($this->getField($field))->literal($value)->end();

            case Comparison::NOT_EQUALS:
                return $parentNode->neq()->field($this->getField($field))->literal($value)->end();

            case Comparison::LESS_THAN:
                return $parentNode->lt()->field($this->getField($field))->literal($value)->end();

            case Comparison::LESS_THAN_EQUAL:
                return $parentNode->lte()->field($this->getField($field))->literal($value)->end();

            case Comparison::GREATER_THAN:
                return $parentNode->gt()->field($this->getField($field))->literal($value)->end();

            case Comparison::GREATER_THAN_EQUAL:
                return $parentNode->gte()->field($this->getField($field))->literal($value)->end();

            case Comparison::IN:
                return $this->getInConstraint($parentNode, $field, $value);

            case Comparison::NOT_IN:
                $node = $parentNode->not();
                $this->getInConstraint($node, $field, $value);

                return $node->end();

            case Comparison::CONTAINS:
                return $parentNode->like()->field($this->getField($field))->literal($value)->end();

            case Comparison::NOT_CONTAINS:
                return $parentNode->not()->like()->field($this->getField($field))->literal($value)->end()->end();

            case Comparison::NULL:
                return $parentNode->not()->fieldIsset($this->getField($field))->end();

            case Comparison::NOT_NULL:
                return $parentNode->fieldIsset($this->getField($field));
        }

        throw new \RuntimeException('Unknown comparator: ' . $comparison->getComparator());
    }
{@inheritdoc}