(convert to BigInteger) mapping
@param constraints constraints
@return new created mapping
161159
public static Mapping<BigInteger> bigInt(Constraint... constraints) {
        return new FieldMapping(
                InputMode.SINGLE,
                mkSimpleConverter(s ->
                    isEmptyStr(s) ? BigInteger.ZERO : new BigInteger(s)
                ), new MappingMeta(MAPPING_BIG_INTEGER, BigInteger.class)
            ).constraint(checking(BigInteger::new, "error.bigint", true))
                .constraint(constraints);
        }
729225
Constraint getUniqueConstraintForColumns(int[] mainTableCols,
            int[] refTableCols) {

        for (int i = 0, size = constraintList.length; i < size; i++) {
            Constraint c    = constraintList[i];
            // A VoltDB extension -- Don't consider non-column expression indexes for this purpose
            if (c.hasExprs()) {
                continue;
            }
            // End of VoltDB extension
            int        type = c.getConstraintType();

            if (type != Constraint.UNIQUE && type != Constraint.PRIMARY_KEY) {
                continue;
            }

            int[] constraintCols = c.getMainColumns();

            if (constraintCols.length != mainTableCols.length) {
                continue;
            }

            if (ArrayUtil.areEqual(constraintCols, mainTableCols,
                                   mainTableCols.length, true)) {
                return c;
            }

            if (ArrayUtil.areEqualSets(constraintCols, mainTableCols)) {
                int[] newRefTableCols = new int[mainTableCols.length];

                for (int j = 0; j < mainTableCols.length; j++) {
                    int pos = ArrayUtil.find(constraintCols, mainTableCols[j]);

                    newRefTableCols[pos] = refTableCols[j];
                }

                for (int j = 0; j < mainTableCols.length; j++) {
                    refTableCols[j] = newRefTableCols[j];
                }

                return c;
            }
        }

        return null;
    }
1165808
public Constraint createModel(final MathRandom random, final Element element) {
		if (element == null) {
			return null;
		}
		Class<? extends Constraint> classObject = null;
		Constraint object = null;
		try {
			classObject = getClassObject(element);
			Constructor<? extends Constraint> constructor = getConstructor(classObject);
			object = getObject(random, element, constructor);
		} catch (InvocationTargetException ex) {
			throw new JFunkException("Could not initialise object of class " + classObject, ex.getCause());
		} catch (Exception ex) {
			throw new JFunkException("Could not initialise object of class " + classObject, ex);
		}
		putToCache(element, object);
		return object;
	}
473744
public final void setConstraints(@NonNull final Constraint<Type>[] constraints) {
        Condition.INSTANCE.ensureNotNull(constraints, "The constraints may not be null");
        Condition.INSTANCE.ensureAtLeast(constraints.length, 1, "The constraints may not be empty");
        this.constraints = constraints;
    }
30662
public Constraint fromJSON(Model mo, JSONObject in) throws JSONConverterException {
        checkKeys(in, "id");
        Object id = in.get("id");
        ConstraintConverter<? extends Constraint> c = json2java.get(id.toString());
        if (c == null) {
            throw new JSONConverterException("No converter available for a constraint having id '" + id + "'");
        }
        return c.fromJSON(mo, in);
    }
864102
@Deprecated
	public ResultSetConstraint build(Map<String, List<String>> constraints)
	{
		return builder(constraints).build();
	}
774423
public StructuredQueryDefinition containerConstraint(String constraintName, StructuredQueryDefinition query) {
    checkQuery(query);
    return new ContainerConstraintQuery(constraintName, query);
  }
242974
public Rules add(PropertyConstraint constraint) {
		CompoundPropertyConstraint and = (CompoundPropertyConstraint)propertiesConstraints.get(constraint
				.getPropertyName());
		if (and == null) {
			putPropertyConstraint(constraint);
		}
		else {
			and.add(constraint);
		}
		return this;
	}
289535
public static <T> Mapping<Optional<T>> optional(Mapping<T> base, Constraint... constraints) {
        String mname = "optional " + base.meta().name;
        return new FieldMapping<Optional<T>>(
                base.options()._inputMode(),
                ((name, data) -> {
                    logger.debug("optional - converting {}", name);

                    if (isEmptyInput(name, data, base.options()._inputMode())) {
                        return Optional.empty();
                    } else return Optional.of(base.convert(name, data));
                }),
                ((name, data, messages, options) -> {
                    logger.debug("optional - validating {}", name);

                    if (isEmptyInput(name, data, base.options()._inputMode())) {
                        return Collections.emptyList();
                    } else { // merge the optional's constraints/label to base mapping then do validating
                        return base.options(o -> o.append_constraints(options._constraints()))
                                .options(o -> o._label(o._label().orElse(options._label().orElse(null))))
                                .validate(name, data, messages, options);
                    }
                }), new MappingMeta(mname, Optional.class, base)
            ).options(o -> o._ignoreConstraints(true))
                .constraint(constraints);
        }
736167
public static Constraint build(String cname, Map<String, Object> payload) {
		if (cname != null && payload != null) {
			if ("min".equals(cname) && payload.containsKey("value")) {
				return min(NumberUtils.toLong(payload.get("value") + "", 0));
			} else if ("max".equals(cname) && payload.containsKey("value")) {
				return max(NumberUtils.toLong(payload.get("value") + "", Config.DEFAULT_LIMIT));
			} else if ("size".equals(cname) && payload.containsKey("min") && payload.containsKey("max")) {
				return size(NumberUtils.toLong(payload.get("min") + "", 0),
						NumberUtils.toLong(payload.get("max") + "", Config.DEFAULT_LIMIT));
			} else if ("digits".equals(cname) && payload.containsKey("integer") && payload.containsKey("fraction")) {
				return digits(NumberUtils.toLong(payload.get("integer") + "", 0),
					NumberUtils.toLong(payload.get("fraction") + "", 0));
			} else if ("pattern".equals(cname) && payload.containsKey("value")) {
				return pattern(payload.get("value"));
			} else {
				return SIMPLE_CONSTRAINTS.get(cname);
			}
		}
		return null;
	}
313646
public static ConstraintViolationException instantiate(
      final SerializationStreamReader streamReader) throws SerializationException {
    final String message = streamReader.readString();
    @SuppressWarnings("unchecked")
    final Set<ConstraintViolation<?>> set = (Set<ConstraintViolation<?>>) streamReader.readObject();
    return new ConstraintViolationException(message, set);
  }
230004
public void add(Constraint constr, String... label)
	{
		checkLabels(constr.canGenerate(), label);

		int[] ind = convertLabelsToInds(label);

		if (ind.length != constr.getVariableSize())
		{
			throw new IllegalArgumentException("Mapped elements do not match the constraint size.");
		}

		// This will also increment lastIndex if necessary
		add(constr, ind);

		if (!hasLabel(label[label.length - 1]) && constr.canGenerate())
		{
			label(label[label.length - 1], lastIndex);
		}
	}
604412
public static function create(array $constraints): ValidationClassMappingBuilderInterface
    {
        $self = new self();
        $self->constraints = [];
        foreach ($constraints as $constraint) {
            $self->addConstraint($constraint);
        }

        return $self;
    }
5018
public BeanType<ConstraintMappingsType<T>> getOrCreateBean()
   {
      List<Node> nodeList = childNode.get("bean");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new BeanTypeImpl<ConstraintMappingsType<T>>(this, "bean", childNode, nodeList.get(0));
      }
      return createBean();
   }
1154795
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "maxItems", scope = GetRenditions.class)
	public JAXBElement<BigInteger> createGetRenditionsMaxItems(BigInteger value) {
		return new JAXBElement<BigInteger>(_GetTypeChildrenMaxItems_QNAME,
				BigInteger.class, GetRenditions.class, value);
	}
451931
@Override
    public List<String> getConstraintMapping() {
        List<String> result = new ArrayList<String>();

        for (String constraintMappingString : constraintMapping) {
            if (constraintMappingString != null) {
                constraintMappingString = constraintMappingString.trim();
            }
            result.add(constraintMappingString);
        }
        return result;
    }
1251150
@VisibleForTesting
  URIBuilder constraints(Constraints constraints) {
    options.putAll(constraints.toQueryMap());
    this.isView = !constraints.isUnbounded();
    return this;
  }