This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I need to get rows of data from the database and place in an Arraylist.
I'm not sure if an ArrayList is the right choice, I need to get my ArrayList and call the Column names to place the out put in a sorted order to print to a file for another system to process so it is imperative that data is in a specific order.
If you get multiple columns from your query you'll probably want to make a class that represents one row and put instances of that class into the collection:
If you really need to sort MyThings after the query (I agree with making the database do the sort if at all possible!) look into implementing Comparable in MyThing and using an ordered collection like TreeSet. Holler if that's not enough to go on.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com