Posted By:
Anonymous
Posted On:
Thursday, December 30, 2004 04:05 AM
I doubt whether you would find a readymade class for your utilization. You could probably write your own. Here's one basic example... you might want to refine it with better error trapping.
public class DataCopier {
public boolean copyData(sourceBean source, destBean dest) {
try {
dest.myVar = Integer.parseInt(source.myVar);
SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); // I am assuming the format in source to be MM/dd/yyyy
dest.myVar2 = dateFormatter.parse(source.myVar2);
return true;
} catch (Exception e) {
e.printStackTrace();
return false;
}
}
}
Thanks!