wood burning stoves 2.0*
The moose likes JDBC and the fly likes Eliminate List Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Eliminate List " Watch "Eliminate List " New topic
Author

Eliminate List

Nick Davenport
Greenhorn

Joined: Jul 27, 2007
Posts: 12
I have a class that fetches a record but dont think I need to use List object because I am fetching one record and not an array of records.
Please advise the best way to change the below class where I assume I should use something different instead of List? Maybe HashMap? Not sure how to do this?

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
If you are getting a single record of RowBean as in your code...

just return the same...
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19718
    
  20


try-catch-finally block and closing of resources omitted for brevity.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Nick Davenport
Greenhorn

Joined: Jul 27, 2007
Posts: 12
Thanks it works great.

Is this an example of DTO (Data Transfer Object)?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30752
    
156

Originally posted by Nick Davenport:
Is this an example of DTO (Data Transfer Object)?

Yes it is.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eliminate List