dgraham     2004/10/03 09:14:44

  Modified:    dbutils/src/java/org/apache/commons/dbutils QueryLoader.java
               dbutils/xdocs changes.xml
  Log:
  Made loadQueries() protected.  PR: 31460
  
  Revision  Changes    Path
  1.4       +10 -6     
jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryLoader.java
  
  Index: QueryLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- QueryLoader.java  28 Feb 2004 00:12:23 -0000      1.3
  +++ QueryLoader.java  3 Oct 2004 16:14:44 -0000       1.4
  @@ -22,10 +22,10 @@
   import java.util.Properties;
   
   /**
  - * <code>QueryLoader</code> loads properties files filled with query name to 
  - * SQL mappings.  It acts as a registry for sets of queries so that multiple 
  - * copies of the same queries aren't loaded into memory.  This class is thread
  - * safe.
  + * <code>QueryLoader</code> is a registry for sets of queries so 
  + * that multiple copies of the same queries aren't loaded into memory.
  + * This implementation loads properties files filled with query name to 
  + * SQL mappings.  This class is thread safe.
    */
   public class QueryLoader {
   
  @@ -80,11 +80,15 @@
       }
   
       /**
  -     * Loads a properties file into a Map object.
  +     * Loads a set of named queries into a Map object.  This implementation
  +     * reads a properties file at the given path.
        * @param path The path that the ClassLoader will use to find the file.
        * @throws IOException
  +     * @throws IllegalArgumentException if the ClassLoader can't find a file at
  +     * the given path.
  +     * @since DbUtils 1.1
        */
  -    private Map loadQueries(String path) throws IOException {
  +    protected Map loadQueries(String path) throws IOException {
           InputStream in = QueryLoader.class.getResourceAsStream(path);
   
           if (in == null) {
  
  
  
  1.7       +4 -0      jakarta-commons/dbutils/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbutils/xdocs/changes.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- changes.xml       3 Oct 2004 15:58:17 -0000       1.6
  +++ changes.xml       3 Oct 2004 16:14:44 -0000       1.7
  @@ -40,6 +40,10 @@
   
       <release version="1.1-dev" date="in CVS">
         <action dev="dgraham" type="update">
  +        Made QueryLoader.loadQueries() protected so subclasses can use query
  +        repositories other than properties files.  PR: 31460        
  +      </action>
  +      <action dev="dgraham" type="update">
           QueryRunner now calls getDataSource() internally any time it needs access
           to its DataSource object to allow subclasses to provide different behavior.
         </action>
  
  
  

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

Reply via email to