(Quick Reference)

scale

Purpose

Set to the desired scale for floating point numbers (i.e., the number of digits to the right of the decimal point).

Examples

salary scale: 2

Description

Set to the desired scale for floating point numbers (i.e., the number of digits to the right of the decimal point). This constraint is applicable for properties of the following types: java.lang.Float, java.lang.Double, and java.math.BigDecimal (and its subclasses). When validation is invoked, this constraint determines if the number includes more nonzero decimal places than the scale permits. If so, it rounds the number to the maximum number of decimal places allowed by the scale. This constraint does not generate validation error messages.

This constraint influences schema generation.

Error Code: N/A