commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Graham <>
Subject Re: [DBUtils] Extending QueryLoader...
Date Tue, 02 Dec 2003 18:28:10 GMT

--- Hernan Silberman <> wrote:
> Hello,
> I'm working on an application that uses "Named Queries" much like the 
> DBUtils QueryLoader class reads in from a Java properties file.  The
> queries in 
> my application are stored in a relational database on the server side
> and I was 
> hoping I could extend QueryLoader so it fetched the NAME/SQL pairs in an
> application-specific way, something like this:
> public synchronized Map load(DataSource aDS) throws IOException;
> public synchronized void unload(DataSource aDS);
> I'm new to DBUtils, and figured I'd ask before trying to extend this
> class in my 
> code to accomodate something like the two methods above.  Is this a sane
> thing 
> to do?  I won't get exactly what I want by extending this class, because
> I don't 
> need the properties file versions of load and unload.  Should I just
> create an 
> alternate app-specific QueryLoader, or am I not seeing a better way of 
> leveraging the existing QueryLoader class?

QueryLoader isn't used by other DbUtils classes; it's just a standalone
helper class that loads queries from properties files.  So, you won't gain
anything by subclassing it and replacing it with a DB lookup.


> thanks...
> Hernan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Do you Yahoo!?
Free Pop-Up Blocker - Get it now

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message