public static Object getParameterValueFromStringWithPattern ( String parameterClass , String value , String pattern ) throws Exception { if ( pattern == null ) { return getParameterValueFromString ( parameterClass , value ) ; } else { if ( QueryParameter . DATE_VALUE . equals ( parameterClass ) || QueryParameter . TIME_VALUE . equals ( parameterClass ) || QueryParameter . TIMESTAMP_VALUE . equals ( parameterClass ) ) { SimpleDateFormat sdf = new SimpleDateFormat ( pattern ) ; return getParameterValueFromString ( parameterClass , value , sdf ) ; } else { return getParameterValueFromString ( parameterClass , value ) ; } } }
Get parameter value from a string represenation using a pattern