public static Object convert ( String dataType , Object record ) { if ( record == null ) { return null ; } if ( dataType . equals ( UUID ) ) { return java . util . UUID . fromString ( record . toString ( ) ) ; } //TODO: add a lot of else if here for the other data types else { return record ; } }
Based on the generic data type convert record to an appropriate Java Data type