Adds a predicate for the specified field, property value, and operator.
544876
private SelectorBuilderImpl singleValuePredicate(String field, String propertyValue,
      PredicateOperator operator) {
    Predicate predicate = new Predicate();
    predicate.setField(field);
    predicate.setOperator(operator);

    String[] values = new String[1];
    values[0] = propertyValue;
    predicate.setValues(values);

    this.predicates.add(predicate);

    return this;
  }
1180677
public void addGreaterOrEqualThanField(String attribute, Object value)
    {
		// PAW
		// addSelectionCriteria(FieldCriteria.buildNotLessCriteria(attribute, value, getAlias()));
		addSelectionCriteria(FieldCriteria.buildNotLessCriteria(attribute, value, getUserAlias(attribute)));
    }
1362242
protected void add(final UpdateOperator op, final String f, final Object value, final boolean convert) {
        if (value == null) {
            throw new QueryException("Val cannot be null");
        }

        Object val = value;
        PathTarget pathTarget = new PathTarget(mapper, clazz, f, validateNames);
        MappedField mf = pathTarget.getTarget();

        if (convert) {
            if (UpdateOperator.PULL_ALL.equals(op) && value instanceof List) {
                val = toDBObjList(mf, (List<?>) value);
            } else {
                val = mapper.toMongoObject(mf, null, value);
            }
        }


        if (UpdateOperator.ADD_TO_SET_EACH.equals(op)) {
            val = new BasicDBObject(UpdateOperator.EACH.val(), val);
        }

        addOperation(op, pathTarget.translatedPath(), val);
    }
672423
public static void setFieldValue(Field field, Object obj, Object value) {
    if (Modifier.isFinal(field.getModifiers())) {
      Object finalValue = getFieldValue(field, obj);
      if (value == null ? finalValue != null : !value.equals(finalValue)) {
        throw new IllegalArgumentException(
            "expected final value <"
                + finalValue
                + "> but was <"
                + value
                + "> on "
                + field.getName()
                + " field in "
                + obj.getClass().getName());
      }
    } else {
      try {
        field.set(obj, value);
      } catch (SecurityException e) {
        throw new IllegalArgumentException(e);
      } catch (IllegalAccessException e) {
        throw new IllegalArgumentException(e);
      }
    }
  }
809164
public void addError(String field, String error) {
		Assert.notNull(field, "field must not be null");
		Assert.notNull(error, "field must not be null");

		addErrors(field, Collections.singletonList(error));

		addResultProperty(SUCCESS_PROPERTY, Boolean.FALSE);
	}
695682
protected function _modifyPredicate(&$predicate, $type, $field, $op, $value) {
        if (!$predicate) {
            $predicate = new Predicate($type);

        } else if ($predicate->getType() !== $type) {
            throw new ExistingPredicateException(sprintf('Predicate clause already created using "%s" conjunction', $predicate->getType()));
        }

        if ($field instanceof Closure) {
            $predicate->bindCallback($field, $this);

        } else if ($value !== null || in_array($op, [Expr::NULL, Expr::NOT_NULL], true)) {
            $predicate->add($field, $op, $value);

        } else if ($op === '!=') {
            $predicate->notEq($field, $value);

        } else {
            $predicate->eq($field, $op);
        }

        return $this;
    }
135394
public void buildSetClauseForCounters(StringBuilder builder, String field, Object value)
    {
        builder = ensureCase(builder, field, false);
        builder.append(EQ_CLAUSE);
        builder = ensureCase(builder, field, false);
        builder.append(INCR_COUNTER);
        appendValue(builder, value.getClass(), value, false, false);
        builder.append(COMMA_STR);
    }
1164322
public TemplateOptionsBuilder addOption(Object field, Object value) {
    additionalOptions.put(field, value);
    return this;
  }
931907
public String buildWhere(String field, Object value, String operation) {
		return CoreSQLUtils.quoteWrap(field) + " "
				+ (value != null ? operation + " ?" : "IS NULL");
	}
1164916
public ColumnBuilder addFieldProperty(String propertyName, String value) {
		fieldProperties.put(propertyName, value);
		return this;
	}
408606
public Criteria addProperty(String name, String value, Operator operator) {
        properties.add(new PropertyCriteria(name, value, operator));
        return this;
    }
203650
protected function byPredicate()
    {
        $fields = $this->fieldIdentifiers();
        if (empty($fields)) {
            throw new UnexpectedValueException(
                'Property is required.'
            );
        }

        $conditions = [];
        $value      = $this->value();
        $operator   = $this->operator();
        $function   = $this->func();
        foreach ($fields as $fieldName) {
            if ($function !== null) {
                $target = sprintf('%1$s(%2$s)', $function, $fieldName);
            } else {
                $target = $fieldName;
            }

            switch ($operator) {
                case 'FIND_IN_SET':
                    if ($value === null) {
                        throw new UnexpectedValueException(sprintf(
                            'Value is required on field "%s" for "%s"',
                            $target,
                            $operator
                        ));
                    }

                    if (is_array($value)) {
                        $value = implode(',', $value);
                    }

                    $conditions[] = sprintf('%2$s(\'%3$s\', %1$s)', $target, $operator, $value);
                    break;

                case '!':
                case 'NOT':
                    $conditions[] = sprintf('%2$s %1$s', $target, $operator);
                    break;

                case 'IS NULL':
                case 'IS TRUE':
                case 'IS FALSE':
                case 'IS UNKNOWN':
                case 'IS NOT NULL':
                case 'IS NOT TRUE':
                case 'IS NOT FALSE':
                case 'IS NOT UNKNOWN':
                    $conditions[] = sprintf('%1$s %2$s', $target, $operator);
                    break;

                case 'IN':
                case 'NOT IN':
                    if ($value === null) {
                        throw new UnexpectedValueException(sprintf(
                            'Value is required on field "%s" for "%s"',
                            $target,
                            $operator
                        ));
                    }

                    if (is_array($value)) {
                        $value = implode('\',\'', $value);
                    }

                    $conditions[] = sprintf('%1$s %2$s (\'%3$s\')', $target, $operator, $value);
                    break;

                default:
                    if ($value === null) {
                        throw new UnexpectedValueException(sprintf(
                            'Value is required on field "%s" for "%s"',
                            $target,
                            $operator
                        ));
                    }

                    $conditions[] = sprintf('%1$s %2$s \'%3$s\'', $target, $operator, $value);
                    break;
            }
        }

        return $this->compileConditions($conditions, 'OR');
    }
1254451
function someProperties(map, predicate) {
        for (var key in map) {
            if (!predicate || predicate(map[key], key))
                return true;
        }
        return false;
    }
664392
public void addProperty(final FedoraResource resource,
            final org.apache.jena.rdf.model.Property predicate,
            final RDFNode value,
            final Map<String, String> namespaces) throws RepositoryException {
        addProperty(resource, predicate, value, namespaces, false);
    }
832958
public static Builder addToSet(String field, Object... values) {
        return new Builder().addToSet(field, values);
    }
1188411
def addFilter(self, field, value):
        
        if "<" not in value or ">" not in value or ".." not in value:
            value = ":" + value

        if self.__urlFilters:
            self.__urlFilters += "+" + field + str(quote(value))
        else:
            self.__urlFilters += field + str(quote(value))
991056
public static Query withValues(String field,
                                   NaryOp op,
                                   Literal... values) {
        Query q = new Query(false);
        q.add("field", field).add("op", op.toString()).add("values", Literal.toJson(values));
        return q;
    }