Seems okay to me. Though I think religious things should probably be in
their own Class namespace rather than the central DbUtils namespace.

So:  ProcedureUtils, or even procedure.ProcedureUtils.

DbUtils can use these invisibly [as it currently uses ResultSetHandler via
anonymous classes and private methods] but would never offer up any type
from a sub-package/religion.

Looking a bit further, the only bit I dislike is the
DbUtils.setConnection(conn). In my view this should be an explicit
instance, so [ignoring the namespace issues] you'd do:

DbUtils dbutils = DbUtils.getInstance();
dbutils.setConnection(conn);
dbutils.doThing(); // etc

Though I'm not sure you didn't mean to do that anyway :)

Hen

On Wed, 5 Mar 2003, Juozas Baliuka wrote:

> I remember we decided not to implement religion in dbutils, but we can try
> this kind of experiment :
>
>  interface MyProcedure {
>
>        int executeSomeQuery( int p1, String p2 );
>
> }
>
>  static final MyProcedure PROC1 = DbUtils.newInstance( MyProcedure.class,
>
> sql,
>
> new ResultSetHandlerImpl()
>
>           );
>
> //use it this way (connection is in ThreadLocal )
> DbUtils.setConnection(connection);
>  in a = PROC1.executeSomeQuery(1,"test");
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to