Package io.vertigo.basics.constraint
Class ConstraintLongLength
- java.lang.Object
-
- io.vertigo.basics.constraint.ConstraintLongLength
-
- All Implemented Interfaces:
Constraint<Integer,Long>
public final class ConstraintLongLength extends Object
Contrainte vérifiant que l'objet est :- soit un Long comprenant au maximum le nombre de chiffres précisé à la construction (nombres de digits)
- soit null
On rappelle que le maximum d'un type Long est compris entre 1O^18 et 10^19
On conseille donc d'utiliser 10^18 comme structure de stockage max en BDD : donc number(18)
Si vous souhaitez flirter avec les 10^19 alors n'utilisez pas de contraintes.- Author:
- pchretien
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkConstraint(Long value)
io.vertigo.core.locale.MessageText
getErrorMessage()
int
getMaxLength()
Property
getProperty()
Integer
getPropertyValue()
-
-
-
Method Detail
-
checkConstraint
public boolean checkConstraint(Long value)
-
getErrorMessage
public io.vertigo.core.locale.MessageText getErrorMessage()
-
getMaxLength
public final int getMaxLength()
- Returns:
- int Nombre maximum de caractères, de chiffres...
-
getProperty
public final Property getProperty()
- Specified by:
getProperty
in interfaceConstraint<Integer,D>
-
getPropertyValue
public final Integer getPropertyValue()
- Specified by:
getPropertyValue
in interfaceConstraint<Integer,D>
-
-