posted 21 years ago
I usually use a List of Maps too, except in the odd case where 2 column names from different tables within the same query are the same ( HashMap only allows one value, then overwrites the first value with the second ). In this case I use a List of Lists.
I have actually created a series of classes/interfaces designed to act like a disconnected ResultSet. Your welcome to use/modify/ignore them as like:
INTERFACES:
Results - represents a disconnected resultset
Row - represents a Row withing the Results
Map Implementation:
ResultMap - a list of Maps implementation
RowMap - Maps implementation of Row used by ResultMap
List Implementation
ResultList - List of Lists implementation of Results
ResultMap - List implementation of Row used in ResultList
Delimited Text File Readers/Writers
DelimWriter
DelimReader
[edited to add links instead of posting way too much code! and fix links]
Jamie
[ August 28, 2003: Message edited by: Jamie Robertson ]