| java.lang.Object org.kuali.module.labor.util.ObjectUtil
ObjectUtil | public class ObjectUtil (Code) | | This class provides a set of facilities that can be used to manipulate objects, for example, object population
|
Method Summary | |
public static void | buildObject(Object targetObject, Object sourceObject, List<String> keyFields) | public static void | buildObject(Object targetObject, Object[] sourceObject, List<String> keyFields) | public static void | buildObject(Object targetObject, Object sourceObject) | public static Map<String, Object> | buildPropertyMap(Object object, List<String> keyFields) | public static boolean | compareObject(Object targetObject, Object sourceObject, List<String> keyFields) | public static void | convertLineToBusinessObject(Object targetObject, String line, String delim, List<String> keyFields) | public static void | convertLineToBusinessObject(Object targetObject, String line, String delim, String fieldNames) | public static void | convertLineToBusinessObject(Object targetObject, String line, int[] fieldLength, List<String> keyFields) | public static Date | formatDate(String value) | public static Timestamp | formatTimeStamp(String value) | public static boolean | hasNullValueField(Object sourceObject) | public static boolean | isDecimal(String value) | public static boolean | isInteger(String value) | public static void | populateBusinessObject(Object businessOjbject, Properties properties, String propertyKey, String fieldNames, String deliminator) | public static void | populateBusinessObject(Object businessOjbject, Properties properties, String propertyKey, int[] fieldLength, List<String> keyFields) | public static List<String> | split(String line, String delim) | public static Object | valueOf(String type, String propertyValue) Get an object of the given type holding the property value of the specified String. |
buildObject | public static void buildObject(Object targetObject, Object sourceObject, List<String> keyFields)(Code) | | Populate the given fields of the target object with the corresponding field values of source object
Parameters: targetObject - the target object Parameters: sourceObject - the source object Parameters: keyFields - the given fields of the target object that need to be popluated |
buildObject | public static void buildObject(Object targetObject, Object[] sourceObject, List<String> keyFields)(Code) | | Populate the given fields of the target object with the values of an array
Parameters: targetObject - the target object Parameters: sourceObject - the given array Parameters: keyFields - the given fields of the target object that need to be popluated |
buildObject | public static void buildObject(Object targetObject, Object sourceObject)(Code) | | Populate the target object with the source object
Parameters: targetObject - the target object Parameters: sourceObject - the source object |
buildPropertyMap | public static Map<String, Object> buildPropertyMap(Object object, List<String> keyFields)(Code) | | This method builds a map of business object with its specified property names and corresponding values
Parameters: businessObject - the given business object Parameters: the - specified fields that need to be included in the return map the map of business object with its property names and values |
compareObject | public static boolean compareObject(Object targetObject, Object sourceObject, List<String> keyFields)(Code) | | Determine if they have the same values in the specified fields
Parameters: targetObject - the target object Parameters: sourceObject - the source object Parameters: keyFields - the specified fields true if the two objects have the same values in the specified fields; otherwise, false |
convertLineToBusinessObject | public static void convertLineToBusinessObject(Object targetObject, String line, String delim, List<String> keyFields)(Code) | | Tokenize the input line with the given deliminator and populate the given object with values of the tokens
Parameters: targetObject - the target object Parameters: line - the input line Parameters: delim - the deminator that separates the fields in the given line Parameters: keyFields - the specified fields |
convertLineToBusinessObject | public static void convertLineToBusinessObject(Object targetObject, String line, String delim, String fieldNames)(Code) | | Tokenize the input line with the given deliminator and populate the given object with values of the tokens
Parameters: targetObject - the target object Parameters: line - the input line Parameters: delim - the deminator that separates the fields in the given line Parameters: keyFields - the specified fields |
convertLineToBusinessObject | public static void convertLineToBusinessObject(Object targetObject, String line, int[] fieldLength, List<String> keyFields)(Code) | | Tokenize the input line with the given deliminator and populate the given object with values of the tokens
Parameters: targetObject - the target object Parameters: line - the input line Parameters: delim - the deminator that separates the fields in the given line Parameters: keyFields - the specified fields |
hasNullValueField | public static boolean hasNullValueField(Object sourceObject)(Code) | | determine if the source object has a field with null as its value
Parameters: sourceObject - the source object |
isDecimal | public static boolean isDecimal(String value)(Code) | | determine if the given string can be converted into a decimal
Parameters: value - the value of the specified string true if the string can be converted into a decimal; otherwise, return false |
isInteger | public static boolean isInteger(String value)(Code) | | determine if the given string can be converted into an Integer
Parameters: value - the value of the specified string true if the string can be converted into an Integer; otherwise, return false |
populateBusinessObject | public static void populateBusinessObject(Object businessOjbject, Properties properties, String propertyKey, String fieldNames, String deliminator)(Code) | | Populate a business object with the given properities and information
Parameters: businessOjbject - the business object to be populated Parameters: properties - the given properties Parameters: propertyKey - the property keys in the properties Parameters: fieldNames - the names of the fields to be populated Parameters: deliminator - the deliminator that separates the values to be used in a string |
populateBusinessObject | public static void populateBusinessObject(Object businessOjbject, Properties properties, String propertyKey, int[] fieldLength, List<String> keyFields)(Code) | | Populate a business object with the given properities and information
Parameters: businessOjbject - the business object to be populated Parameters: properties - the given properties Parameters: propertyKey - the property keys in the properties Parameters: fieldNames - the names of the fields to be populated Parameters: deliminator - the deliminator that separates the values to be used in a string |
split | public static List<String> split(String line, String delim)(Code) | | Tokenize the input line with the given deliminator and populate the given object with values of the tokens
Parameters: targetObject - the target object Parameters: line - the input line Parameters: delim - the deminator that separates the fields in the given line Parameters: keyFields - the specified fields |
valueOf | public static Object valueOf(String type, String propertyValue)(Code) | | Get an object of the given type holding the property value of the specified String.
Parameters: type - the given type of the returning object Parameters: propertyValue - the property value of the specified string an object of the given type holding the property value of the specified String |
|
|