Campbell Ritchie wrote:If you cut green grass with a red lawnmower you will end up with short grass. If you program something badly, like elevators on aeroplanes, you can kill 300 people. We see people who really intend to use w=code even worse than yours. That is why we worry about the whole of your code.
Ken Matson wrote:. . . you ask how to put gas in your lawnmower, and everyone starts telling you you've got the wrong kind of yard, and do you really need a lawnmower, and why is your lawnmower red and not green, etc. etc. etc. . . .
You take your car to the garage and ask for a new tyre. They don't notice your brakes hardly work any more. That is why we worry about the whole of your code.
Yes, the whole idea of generics is to avoid casting. Which means if you are casting anything you aren't using generics right.
Carey Brown wrote:I'm a bit unclear as to what you are trying to do. It sounds like you are trying to use a ResultSet as a collection that you can manipulate. In my experience a ResultSet is best treated as read-only and that the ResultSet should be converted to a Collection (e.g. List) of a class that will hold all the columns for a row (i.e. a Data Access Object). All manipulations would then be done on the Collection you created, not the ResultSet.
Paul Clapham wrote:I usually find that asking why something is implemented in a particular way is fruitless -- even if you find out, it's still going to be implemented in that way. In the end you have to write your code to match the implementation of that thing anyway.
Paul Clapham wrote:Actually, after I read the API docs, I found out that Oracle's RowSet tutorial tells you to do exactly what I suggested. It doesn't mention com.sun classes at all.
(I always by preference read the Oracle tutorials before anybody else's tutorial.)
Paul Clapham wrote:
But you might want to try addressing the "limitations" you found in some other way. Would you like to ask that question here?