public class ValidatorUtils extends Object
Constructor and Description |
---|
ValidatorUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compareValues(Object value1,
Object value2,
DataType dataType,
String operator,
boolean isCaseSensitive,
DateParser dateParser) |
static Boolean |
getBoolean(Object o) |
static Date |
getDate(Object o,
DateParser dateParser) |
static Double |
getDouble(Object o) |
static FieldDefinition |
getField(String key,
ObjectStructureDefinition objStructure)
Traverses the dictionary ObjectStructure to find the field with the match
key, type and state
The key has to relative to the current object structure that is being traversed.
|
static FieldDefinition |
getField(String key,
ObjectStructureHierarchy objStructureHierarchy)
Traverses the dictionary ObjectStructure to find the field with the match
key, type and state
The key has to relative to the current object structure that is being traversed.
|
static Object |
getFieldValue(String key,
ConstraintDataProvider dataProvider)
Traverses the parent data for the field value.
|
static Float |
getFloat(Object o) |
static Integer |
getInteger(Object o) |
static Long |
getLong(Object o) |
static String |
getString(Object o) |
static boolean |
hasErrors(List<ValidationResultInfo> validationResults)
Inspect the validation result to determine if there are any errors.
|
static boolean |
hasWarnings(List<ValidationResultInfo> validationResults)
Inspect the validation result to determine if there are any errors.
|
public ValidatorUtils()
public static boolean compareValues(Object value1, Object value2, DataType dataType, String operator, boolean isCaseSensitive, DateParser dateParser)
public static Integer getInteger(Object o)
public static Date getDate(Object o, DateParser dateParser)
public static Boolean getBoolean(Object o)
public static FieldDefinition getField(String key, ObjectStructureDefinition objStructure)
key
- objStructure
- public static FieldDefinition getField(String key, ObjectStructureHierarchy objStructureHierarchy)
key
- objStructureHierarchy
- public static Object getFieldValue(String key, ConstraintDataProvider dataProvider)
key
- dataProvider
- public static boolean hasErrors(List<ValidationResultInfo> validationResults)
validationResults
- public static boolean hasWarnings(List<ValidationResultInfo> validationResults)
validationResults
- Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.