lundi 15 août 2016

How to map fields from a database into an object?

I am able to take any arbitrary object and turn it into create-table code, insert code, or update code -- however I am having difficulties with retrieval.

If I have a SQLite table schema, for example columns id, personName, personAge, with data types LONG, TEXT, INTEGER, accordingly.

I don't know if there is a general way to say "We have this list of column names and a list of arbitrary values with mixed datatypes. Now create an object using a constructor that matches this signature."

Does Java reflection allow for this in any way?





Aucun commentaire:

Enregistrer un commentaire