public final class ConstraintUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DATE_FORMAT |
Modifier and Type | Method and Description |
---|---|
static SimpleDateFormat |
formatter() |
static <T extends Constraint> |
getConstraint(Collection<Constraint> constraints,
Class<T> constraintClass) |
static BigDecimal |
objectToBigDecimal(Object object)
Supports any object which toString method return a numeric as String.
|
static Long |
objectToPostiveLong(Object object)
Supports any object which toString method return a positive numeric as String.
|
static Long |
objectToTimeMillis(Object object)
|
public static final String DATE_FORMAT
public static SimpleDateFormat formatter()
public static Long objectToTimeMillis(Object object)
object
- Any objectpublic static BigDecimal objectToBigDecimal(Object object)
object
- Any objectpublic static Long objectToPostiveLong(Object object)
object
- Any objectpublic static <T extends Constraint> T getConstraint(Collection<Constraint> constraints, Class<T> constraintClass)
Copyright © 2015 Nuxeo SA. All rights reserved.