IMHO the main flaw with your approach is that you need indexing your set methods, because Java reflection doesn't keep any order by itself on declared methods
or fields of a class. Moreover, you need to keep in sync ordering of the columns in the query with ordering of the setter methods: what about if instead of
"SELECT ALFA, BETA FROM TABLE " you run a "SELECT GAMMA, ALFA, BETA FROM TABLE " ?
You may try and write a custom annotation which let you to map a field of your DocLine class with a column of the select, for example
After getting a ResultSet from your query, you may want to use ResultSetMetaData and get retrieved columns' names, and follow a similar pseudo-code
Of course an heavy usage of reflection causes the code to run slower, but it may be a first step towards reading cursors
automatically instead of writing boilerplate code.
By the way: this it's just the role played by Persistence Engines like JPA or Hibernate: they do something similar of what
I described you, but, of course, in a smarted and cleverer way... but if you want to play with JDBC that may be an interesting starting point.