| 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: 973
|
|
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: 19232
|
|
try-catch-finally block and closing of resources omitted for brevity.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
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
internet detective
Marshal
Joined: May 26, 2003
Posts: 26489
|
|
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
|
 |
 |
|
|
subject: Eliminate List
|
|
|