Package io.vertigo.basics.constraint
Class ConstraintBigDecimal
- java.lang.Object
-
- io.vertigo.basics.constraint.ConstraintBigDecimal
-
- All Implemented Interfaces:
Constraint<String,BigDecimal>
public final class ConstraintBigDecimal extends Object implements Constraint<String,BigDecimal>
Manage BigDecimal's constraints. The configuration is like the configuration of Database's decimal (DECIMAL(M,D)). Where M is the maximum of digits (the precision) and D is the number of digits to the right of the decimal point (the scale). The maximum number of digits to the left of the decimal point is check too and must be less than M-D.- Author:
- mlaroche
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkConstraint(BigDecimal value)
io.vertigo.core.locale.MessageText
getErrorMessage()
Property<String>
getProperty()
String
getPropertyValue()
-
-
-
Method Detail
-
checkConstraint
public boolean checkConstraint(BigDecimal value)
- Specified by:
checkConstraint
in interfaceConstraint<String,BigDecimal>
-
getErrorMessage
public io.vertigo.core.locale.MessageText getErrorMessage()
- Specified by:
getErrorMessage
in interfaceConstraint<String,BigDecimal>
-
getProperty
public Property<String> getProperty()
- Specified by:
getProperty
in interfaceConstraint<String,BigDecimal>
-
getPropertyValue
public String getPropertyValue()
- Specified by:
getPropertyValue
in interfaceConstraint<String,BigDecimal>
-
-