Set compareToField

@param \TechPromux\DynamicQueryBundle\Entity\MetadataField $compareToField

@return DataModelCondition
14158
public function setCompareToField(\TechPromux\DynamicQueryBundle\Entity\MetadataField $compareToField = null)
    {
        $this->compareToField = $compareToField;

        return $this;
    }
1128458
private function getComparisonField(array $item, string $field)
    {
        if (! isset($item[$field])) {
            throw new InvalidArgumentException(sprintf('Unable to find comparison field %s', $field));
        }

        $value = $item[$field];

        return is_string($value) ? strtolower($value) : $value;
    }
1238163
public function ltFieldValidator($val, string $compareField): bool
    {
        $maxVal = $this->getByPath($compareField);

        if ($maxVal === null) {
            return false;
        }

        return Validators::lt($val, $maxVal);
    }
1085879
public function get_element_by_name($name, $compareMode=self::SLUG_COMPARE)
    {
        if (null === $this->cache_name_id) {
            $this->cache_name_id = [];

            foreach ($this->elements as $id => $meta) {
                $this->cache_name_id[$meta->get_name()] = $id;
            }
        }

        if($compareMode == self::SLUG_COMPARE) {
            $name = databox_field::generateName($name, $this->unicode);
        }

        return isset($this->cache_name_id[$name])
            ? $this->elements[$this->cache_name_id[$name]]
            : null;
    }
235123
@Override
    public int compareTo(Reference o) {
        return new CompareToBuilder()
                .append(source, o.source)
                .append(name, o.name)
                .append(url, o.url)
                .toComparison();
    }
744191
public function isFieldBlacklisted(Metadata $meta, $field, $configPath = null)
    {
        $entityName = $meta->getEntityName();

        if (!isset($this->cache[$entityName])) {
            $this->cache[$entityName] = [];
        }
        if (!isset($this->cache[$entityName][$configPath])) {
            $this->cache[$entityName][$configPath] = [];
        }
        if (!isset($this->cache[$entityName][$field][$configPath])) {
            $this->cache[$entityName][$field][$configPath] = $this->checkIfFieldBlacklisted($meta, $field, $configPath);
        }

        return $this->cache[$entityName][$field][$configPath];
    }
943361
public function walkComparison(Comparison $comparison)
    {
        $field = $comparison->getField();
        $value = $comparison->getValue()->getValue(); // shortcut for walkValue()

        if (isset($this->classMetadata->associationMappings[$field]) &&
            $value !== null &&
            ! is_object($value) &&
            ! in_array($comparison->getOperator(), array(Comparison::IN, Comparison::NIN))) {

            throw PersisterException::matchingAssocationFieldRequiresObject($this->classMetadata->name, $field);
        }

        return $this->persister->getSelectConditionStatementSQL($field, $value, null, $comparison->getOperator());
    }
1117469
public function gte($field, $value)
    {
        if(!$value instanceof Expr\ConditionalExpression) {
            $value = $this->buildPart($value);
        }
        return new Expr\ComparisonExpression($field, $value, Expr\ComparisonExpression::GTE);
    }
198880
@Override
    public int compareTo(final IndexTerm obj) {
        return DITAOTCollator.getInstance(termLocale).compare(termKey, obj.getTermKey());
    }
1311706
protected function isEquals($value, $compareField, $field)
    {
        is_array($compareField) && $compareField = $compareField[0];
        return isset($this->data[$field]) && isset($this->data[$compareField]) && $this->data[$field] == $this->data[$compareField];
    }
261996
public int compareTo(Field field)
    {
        if (field instanceof BaseField) if (!this.isSameType((BaseField)field))
            return super.compareTo(field);
        short short1 = Short.MIN_VALUE, short2 = Short.MAX_VALUE;
        Short tempShort = (Short)this.getData();    // Get the physical data
        if (tempShort != null)
            short1 = tempShort.shortValue();
        tempShort = (Short)field.getData();   // Get the physical data
        if (tempShort != null)
            short2 = tempShort.shortValue();
        if (short1 == short2)
            return 0;
        if (short1 < short2)
            return -1;
        else
            return 1;
    }
1011798
@Override
  public int compareTo(RuleMatch other) {
    Objects.requireNonNull(other);
    return Integer.compare(getFromPos(), other.getFromPos());
  }
847940
public function gt($field, $value)
    {
        if(!$value instanceof Expr\ConditionalExpression) {
            $value = $this->buildPart($value);
        }
        return new Expr\ComparisonExpression($field, $value, Expr\ComparisonExpression::GT);
    }
1078373
public function setMinComparison(ComparisonExpression $minComparison)
    {
        if($minComparison->getField() != $this->getField()) {
            throw new \InvalidArgumentException('Field of Minimum Comparison is not equal to field of Range.');
        } else if(($minComparison->getValue()->isNull()) &&  !(ComparisonExpression::GT & $minComparison->getOperator())) {
            throw new \InvalidArgumentException('Range.min has to be an Any or a Greater Comparison.');
        }

        $this->minComparison = $minComparison;
        return $this;
    }
535518
public function requestComparisonStrategy(): ComparisonStrategy {
		if ($this->comparisonStrategy !== null) {
			return $this->comparisonStrategy;
		}
		
		$selectedQueryPoints = array_merge($this->queryModel->getNamedSelectQueryPoints(),
				$this->queryModel->getUnnamedSelectQueryPoints());
		if (1 != count($selectedQueryPoints)) {
			throw new CriteriaConflictException('Subselect not comparable.');
		}
		
		$comparisonStrategy = current($selectedQueryPoints)->requestComparisonStrategy();
		CastUtils::assertTrue($comparisonStrategy instanceof ComparisonStrategy);
		if ($comparisonStrategy->getType() != ComparisonStrategy::TYPE_COLUMN) {
			throw new CriteriaConflictException();
		}
		
		$columnComparable = $comparisonStrategy->getColumnComparable();
		
		$this->queryModel->getQueryItemSelect()->selectQueryItem($columnComparable
				->buildQueryItem(CriteriaComparator::OPERATOR_EQUAL));
		
		$selectBuilder  = $this->queryState->getPdo()->getMetaData()->createSelectStatementBuilder();
		$this->queryModel->apply($selectBuilder);
				
		return $this->comparisonStrategy = new ComparisonStrategy(new CriteriaColumnComparable(
				$selectBuilder->toQueryResult(), $columnComparable));
	}
1028716
public function equals(Node $toCompare)
    {
        // Only compare, if given instance is a literal
        if ($toCompare->isLiteral() && $this->getDatatype()->equals($toCompare->getDatatype())) {
            return $this->getValue() === $toCompare->getValue() && $this->getLanguage() == $toCompare->getLanguage();
        }

        return false;
    }
424281
public static <T extends Key <T>> NameMatcher <T> nameEquals (final String compareTo)
  {
    return new NameMatcher <> (compareTo, StringOperatorName.EQUALS);
  }