function setConstraints(oType, oConstraints) {
		var vNullable, iPrecision, vPrecision, iScale, vScale;

		function logWarning(vValue, sName) {
			Log.warning("Illegal " + sName + ": " + vValue, null, oType.getName());
		}

		function validateInt(vValue, iDefault, iMinimum, sName) {
			var iValue = typeof vValue === "string" ? parseInt(vValue) : vValue;

			if (iValue === undefined) {
				return iDefault;
			}
			if (typeof iValue !== "number" || isNaN(iValue) || iValue < iMinimum) {
				logWarning(vValue, sName);
				return iDefault;
			}
			return iValue;
		}

		/*
		 * Validates whether the given value is a valid Edm.Decimal value.
		 *
		 * @param {string} sValue
		 *   the constraint minimum or maximum value
		 * @param {string} sName
		 *   name for logging
		 * @returns {string}
		 *   the validated value or undefined
		 */
		function validateDecimal(sValue, sName) {
			if (sValue) {
				if (sValue.match(rDecimal)) {
					return sValue;
				}
				logWarning(sValue, sName);
			}

			return undefined;
		}

		function validateBoolean(vValue, sName) {
			if (vValue === true || vValue === "true") {
				return true;
			}
			if (vValue !== undefined && vValue !== false && vValue !== "false") {
				logWarning(vValue, sName);
			}

			return undefined;
		}

		function setConstraint(sName, vValue, vDefault) {
			if (vValue !== vDefault) {
				oType.oConstraints = oType.oConstraints || {};
				oType.oConstraints[sName] = vValue;
			}
		}

		oType.oConstraints = undefined;
		if (oConstraints) {
			vNullable = oConstraints.nullable;
			vPrecision = oConstraints.precision;
			vScale = oConstraints.scale;

			iScale = vScale === "variable" ? Infinity : validateInt(vScale, 0, 0, "scale");
			iPrecision = validateInt(vPrecision, Infinity, 1, "precision");
			if (iScale !== Infinity && iPrecision < iScale) {
				Log.warning("Illegal scale: must be less than or equal to precision (precision="
					+ vPrecision + ", scale=" + vScale + ")", null, oType.getName());
				iScale = Infinity; // "variable"
			}
			setConstraint("precision", iPrecision, Infinity);
			setConstraint("scale", iScale, 0);
			if (vNullable === false || vNullable === "false") {
				setConstraint("nullable", false, true);
			} else if (vNullable !== undefined && vNullable !== true && vNullable !== "true") {
				logWarning(vNullable, "nullable");
			}

			setConstraint("minimum", validateDecimal(oConstraints.minimum, "minimum"));
			setConstraint("minimumExclusive",
				validateBoolean(oConstraints.minimumExclusive, "minimumExclusive"));
			setConstraint("maximum", validateDecimal(oConstraints.maximum, "maximum"));
			setConstraint("maximumExclusive",
				validateBoolean(oConstraints.maximumExclusive, "maximumExclusive"));
		}
		oType._handleLocalizationChange();
	}
Sets the constraints.

@param {sap.ui.model.odata.type.Decimal} oType
  the type instance
@param {object} [oConstraints]
  constraints, see {@link #constructor}