commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [DBUtils] efficient use of resultsetwrapper
Date Thu, 06 Mar 2003 10:06:39 GMT
Hy all,

I have a little problem with using the ResultSetWrappers.
I dont know at the moment how to use them efficient.

If I get a resultSet, I store it in new object which can be an ObjectArray
or a Collection and the result set is closed as fast as possible. This is done
in the database layer. This new object is then passed to the business layer
because I dont want to pass the original resultset.

If I now wrap the resultset in this process in a SQLNullCheckedResultSet or
a formatMYResultSet or somewhat else, I cannot use it in an efficient way,
because I use either only the getObject() or the getString() methods of the
result set. I think it costs to much performance to use a big switch statement
to process all sql.Types in every row of the result set.

So I think it would be better to use a kind of formatter at the time of
instantiating the business objects.
The advantage would be, that at this point it is clear to which object every
resultset field has to be cast and the expensive big switch statement is not

I am really thankful for all answer


+++ GMX - Mail, Messaging & more +++
Bitte l├Ącheln! Fotogalerie online mit GMX ohne eigene Homepage!

View raw message