public class ValidationUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ValidationUtils.Result |
Constructor and Description |
---|
ValidationUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
buildPath(String attributePath,
String attributeName) |
static boolean |
compareValues(Object value1,
Object value2,
DataType dataType,
String operator,
boolean isCaseSensitive,
DateTimeService dateTimeService) |
static Object |
convertToDataType(Object value,
DataType dataType,
DateTimeService dateTimeService) |
static Boolean |
getBoolean(Object o) |
static Date |
getDate(Object o,
DateTimeService dateTimeService) |
static Double |
getDouble(Object o) |
static Float |
getFloat(Object o) |
static Integer |
getInteger(Object o) |
static int |
getLastPathIndex(String attributePath)
Used to get the rightmost index value of an attribute path.
|
static Long |
getLong(Object o) |
static String[] |
getPathTokens(String fieldPath) |
static String |
getString(Object o) |
static boolean |
hasText(String string) |
static <T> ValidationUtils.Result |
isGreaterThan(T value,
Comparable<T> limit) |
static <T> ValidationUtils.Result |
isGreaterThanOrEqual(T value,
Comparable<T> limit) |
static <T> ValidationUtils.Result |
isLessThan(T value,
Comparable<T> limit) |
static <T> ValidationUtils.Result |
isLessThanOrEqual(T value,
Comparable<T> limit) |
static boolean |
isNullOrEmpty(Object value) |
public ValidationUtils()
public static int getLastPathIndex(String attributePath)
attributePath
- public static boolean compareValues(Object value1, Object value2, DataType dataType, String operator, boolean isCaseSensitive, DateTimeService dateTimeService)
public static Integer getInteger(Object o)
public static Date getDate(Object o, DateTimeService dateTimeService) throws IllegalArgumentException
IllegalArgumentException
public static Boolean getBoolean(Object o)
public static boolean isNullOrEmpty(Object value)
public static Object convertToDataType(Object value, DataType dataType, DateTimeService dateTimeService) throws AttributeValidationException
AttributeValidationException
public static <T> ValidationUtils.Result isGreaterThan(T value, Comparable<T> limit)
public static <T> ValidationUtils.Result isGreaterThanOrEqual(T value, Comparable<T> limit)
public static <T> ValidationUtils.Result isLessThan(T value, Comparable<T> limit)
public static <T> ValidationUtils.Result isLessThanOrEqual(T value, Comparable<T> limit)
public static String[] getPathTokens(String fieldPath)
Copyright © 2005–2016 The Kuali Foundation. All rights reserved.