A kind soul sent me this link to a Powered-by-Struts auction
application, 

BrewTrade by Java-Genius - http://www.java-genius.com/

that uses a neat mechanism to abstract a database result into a generic
list of fields (KeyValuePairs), which can then be used to populate a
data bean. The method that gathers the database results packages each
value with its column name, which the data bean can then use to match
it up with one of its own properties. 

This comes very close to turning a result into an array of standard
Java Beans, using the metadata to generate the "introspective" layer. 

Has anyone seen a type of factory that would do this; take a resultset
and spit out a list of JavaBeans, where the column names automatically
become "get" accessors. 


Reply via email to