Hi,
I want to map a simple List (a ResultSet from Database) to a specific Value Object. The List is for example :
List<Object> list = new ArrayList<Object>(); list.add("Name"); list.add("Address");
I want to map it to an object like
public class MyClass { public String name; public String address; }
Is it possible to create an xml mapping file to do : list ==> MyClass.name list ==> MyClass.address
Thanks for your help !
Here is a solution, a best option to solve this problem.
http://stackoverflow.com/questions/12171868/how-to-map-a-simple-arraylist-to-a-vo-using-dozer
But the good option would be to use the "this" annotation.
Log in to post a comment.
Hi,
I want to map a simple List (a ResultSet from Database) to a specific Value Object.
The List is for example :
List<Object> list = new ArrayList<Object>();
list.add("Name");
list.add("Address");
I want to map it to an object like
public class MyClass
{
public String name;
public String address;
}
Is it possible to create an xml mapping file to do :
list ==> MyClass.name
list ==> MyClass.address
Thanks for your help !
Here is a solution, a best option to solve this problem.
http://stackoverflow.com/questions/12171868/how-to-map-a-simple-arraylist-to-a-vo-using-dozer
But the good option would be to use the "this" annotation.