Hello Commons Users,
I'm looking for a way to read files directly into POJOs. The idea is that the
file layout would be defined in an "properties"-type file (XML or something).
The layout could be delimited or fixed-width, with the layout file defining the
columns and which POJO member variable they should be set to.
For example, a file might be tilde (~) delimited and follow this
layout:ID~first name~last name~age~address~city~state~zip
I'd like to read it into a class:
public class Person { private Integer id;
private String firstName;
private String lastName; private Integer age; private String address;
private String city;
private String state;
private String zip;
// Getters and Setters ...
}
Is there a tool that do this?
ThanksAlfonso