← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2028: Upgraded to quick-1.2, uses javax.sql.DataSource instead of custom JdbcConfiguration class.

 

------------------------------------------------------------
revno: 2028
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2010-11-10 14:45:42 +0100
message:
  Upgraded to quick-1.2, uses javax.sql.DataSource instead of custom JdbcConfiguration class.
removed:
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java
added:
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect/
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect/StatementDialectFactoryBean.java
modified:
  dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java
  dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedDataValueBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedIndicatorValueBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryCategoryOptionAssociationBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryComboCategoryAssociationBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CompleteDataSetRegistrationBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ConceptBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryDataElementBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryIndicatorBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryComboBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryOptionBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetSourceAssociationBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GenericBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ImportDataValueBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupMemberBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/PeriodBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/SourceBatchHandler.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/StatementBuilderFactoryBean.java
  dhis-2/dhis-support/dhis-support-jdbc/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/pom.xml


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/report/manager/DefaultReportManager.java	2010-11-10 13:45:42 +0000
@@ -32,11 +32,12 @@
 import java.util.HashMap;
 import java.util.Map;
 
-import org.amplecode.quick.JdbcConfiguration;
+import org.hibernate.cfg.Configuration;
 import org.hisp.dhis.external.configuration.ConfigurationManager;
 import org.hisp.dhis.external.configuration.NoConfigurationFoundException;
 import org.hisp.dhis.external.location.LocationManager;
 import org.hisp.dhis.external.location.LocationManagerException;
+import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
 import org.hisp.dhis.report.ReportManager;
 import org.hisp.dhis.system.util.CodecUtils;
 
@@ -81,11 +82,11 @@
     // Dependencies
     // -------------------------------------------------------------------------
 
-    private JdbcConfiguration jdbcConfiguration;
+    private HibernateConfigurationProvider hibernateConfigurationProvider;
 
-    public void setJdbcConfiguration( JdbcConfiguration jdbcConfiguration )
+    public void setHibernateConfigurationProvider( HibernateConfigurationProvider hibernateConfigurationProvider )
     {
-        this.jdbcConfiguration = jdbcConfiguration;
+        this.hibernateConfigurationProvider = hibernateConfigurationProvider;
     }
 
     private LocationManager locationManager;
@@ -153,13 +154,15 @@
     
     public Map<String[], String> getReportConnectionMap()
     {
-        String encryptedPassword = CodecUtils.encryptBase64( jdbcConfiguration.getPassword() );
+        Configuration config = hibernateConfigurationProvider.getConfiguration();
+                
+        String encryptedPassword = CodecUtils.encryptBase64( config.getProperty( "hibernate.connection.password" ) );
         
         Map<String[], String> map = new HashMap<String[], String>();
 
-        map.put( new String[] { START_TAG_DRIVER, END_TAG_DRIVER }, START_TAG_DRIVER + jdbcConfiguration.getDriverClass() + END_TAG_DRIVER );
-        map.put( new String[] { START_TAG_URL, END_TAG_URL }, START_TAG_URL + jdbcConfiguration.getConnectionUrl() + END_TAG_URL );
-        map.put( new String[] { START_TAG_USER_NAME, END_TAG_USER_NAME }, START_TAG_USER_NAME + jdbcConfiguration.getUsername() + END_TAG_USER_NAME );
+        map.put( new String[] { START_TAG_DRIVER, END_TAG_DRIVER }, START_TAG_DRIVER + config.getProperty( "hibernate.connection.driver_class" ) + END_TAG_DRIVER );
+        map.put( new String[] { START_TAG_URL, END_TAG_URL }, START_TAG_URL + config.getProperty( "hibernate.connection.url" ) + END_TAG_URL );
+        map.put( new String[] { START_TAG_USER_NAME, END_TAG_USER_NAME }, START_TAG_USER_NAME + config.getProperty( "hibernate.connection.username" ) + END_TAG_USER_NAME );
         map.put( new String[] { START_TAG_PASSWORD, END_TAG_PASSWORD }, START_TAG_PASSWORD + encryptedPassword + END_TAG_PASSWORD );
         
         return map;

=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml	2010-11-10 13:45:42 +0000
@@ -83,7 +83,7 @@
       value="reports"/>
     <property name="reportConfigFile" 
       value="reportConfiguration.xml"/>
-	<property name="jdbcConfiguration" ref="jdbcConfiguration"/>
+	<property name="hibernateConfigurationProvider" ref="hibernateConfigurationProvider"/>
 	<property name="locationManager" ref="locationManager"/>
 	<property name="configurationManager" ref="configurationManager"/>
   </bean>

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedDataValueBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedDataValueBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedDataValueBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.aggregation.AggregatedDataValue;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
     
-    public AggregatedDataValueBatchHandler( JdbcConfiguration configuration )
+    public AggregatedDataValueBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedIndicatorValueBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedIndicatorValueBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/AggregatedIndicatorValueBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.aggregation.AggregatedIndicatorValue;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public AggregatedIndicatorValueBatchHandler( JdbcConfiguration configuration )
+    public AggregatedIndicatorValueBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryCategoryOptionAssociationBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryCategoryOptionAssociationBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryCategoryOptionAssociationBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public CategoryCategoryOptionAssociationBatchHandler( JdbcConfiguration configuration )
+    public CategoryCategoryOptionAssociationBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryComboCategoryAssociationBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryComboCategoryAssociationBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CategoryComboCategoryAssociationBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public CategoryComboCategoryAssociationBatchHandler( JdbcConfiguration configuration )
+    public CategoryComboCategoryAssociationBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CompleteDataSetRegistrationBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CompleteDataSetRegistrationBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/CompleteDataSetRegistrationBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataset.CompleteDataSetRegistration;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public CompleteDataSetRegistrationBatchHandler( JdbcConfiguration configuration )
+    public CompleteDataSetRegistrationBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ConceptBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ConceptBatchHandler.java	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ConceptBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.concept.Concept;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public ConceptBatchHandler( JdbcConfiguration configuration )
+    public ConceptBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.datadictionary.DataDictionary;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataDictionaryBatchHandler( JdbcConfiguration configuration )
+    public DataDictionaryBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryDataElementBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryDataElementBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryDataElementBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataDictionaryDataElementBatchHandler( JdbcConfiguration configuration )
+    public DataDictionaryDataElementBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryIndicatorBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryIndicatorBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataDictionaryIndicatorBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataDictionaryIndicatorBatchHandler( JdbcConfiguration configuration )
+    public DataDictionaryIndicatorBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java	2010-05-25 17:36:53 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElement;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataElementBatchHandler( JdbcConfiguration configuration )
+    public DataElementBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryBatchHandler.java	2010-09-17 21:30:59 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElementCategory;
 
@@ -44,9 +46,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public DataElementCategoryBatchHandler( JdbcConfiguration configuration )
+    public DataElementCategoryBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryComboBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryComboBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryComboBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElementCategoryCombo;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public DataElementCategoryComboBatchHandler( JdbcConfiguration configuration )
+    public DataElementCategoryComboBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryOptionBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryOptionBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementCategoryOptionBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElementCategoryOption;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public DataElementCategoryOptionBatchHandler( JdbcConfiguration configuration )
+    public DataElementCategoryOptionBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElementGroup;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataElementGroupBatchHandler( JdbcConfiguration configuration )
+    public DataElementGroupBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataElementGroupMemberBatchHandler( JdbcConfiguration configuration )
+    public DataElementGroupMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataelement.DataElementGroupSet;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public DataElementGroupSetBatchHandler( JdbcConfiguration configuration )
+    public DataElementGroupSetBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataElementGroupSetMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public DataElementGroupSetMemberBatchHandler( JdbcConfiguration configuration )
+    public DataElementGroupSetMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.dataset.DataSet;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataSetBatchHandler( JdbcConfiguration configuration )
+    public DataSetBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetCompletenessResultBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.completeness.DataSetCompletenessResult;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataSetCompletenessResultBatchHandler( JdbcConfiguration configuration )
+    public DataSetCompletenessResultBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataSetMemberBatchHandler( JdbcConfiguration configuration )
+    public DataSetMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     } 
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetSourceAssociationBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetSourceAssociationBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataSetSourceAssociationBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -1,6 +1,8 @@
 package org.hisp.dhis.jdbc.batchhandler;
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
     
-    public DataSetSourceAssociationBatchHandler( JdbcConfiguration configuration )
+    public DataSetSourceAssociationBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/DataValueBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.datavalue.DataValue;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public DataValueBatchHandler( JdbcConfiguration configuration )
+    public DataValueBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GenericBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GenericBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GenericBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -29,7 +29,9 @@
 
 import java.util.List;
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 
 /**
@@ -43,9 +45,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public GenericBatchHandler( JdbcConfiguration configuration )
+    public GenericBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
     
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public GroupSetBatchHandler( JdbcConfiguration configuration )
+    public GroupSetBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/GroupSetMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public GroupSetMemberBatchHandler( JdbcConfiguration configuration )
+    public GroupSetMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ImportDataValueBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ImportDataValueBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ImportDataValueBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.ImportDataValue;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public ImportDataValueBatchHandler( JdbcConfiguration configuration )
+    public ImportDataValueBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java	2010-05-25 17:36:53 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.indicator.Indicator;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public IndicatorBatchHandler( JdbcConfiguration configuration )
+    public IndicatorBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.indicator.IndicatorGroup;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public IndicatorGroupBatchHandler( JdbcConfiguration configuration )
+    public IndicatorGroupBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
     
-    public IndicatorGroupMemberBatchHandler( JdbcConfiguration configuration )
+    public IndicatorGroupMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.indicator.IndicatorGroupSet;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public IndicatorGroupSetBatchHandler( JdbcConfiguration configuration )
+    public IndicatorGroupSetBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorGroupSetMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public IndicatorGroupSetMemberBatchHandler( JdbcConfiguration configuration )
+    public IndicatorGroupSetMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/IndicatorTypeBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.indicator.IndicatorType;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public IndicatorTypeBatchHandler( JdbcConfiguration configuration )
+    public IndicatorTypeBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java	2010-05-25 17:36:53 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public OrganisationUnitBatchHandler( JdbcConfiguration configuration )
+    public OrganisationUnitBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, false );
+        super( dataSource, dialect, true, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.organisationunit.OrganisationUnitGroup;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public OrganisationUnitGroupBatchHandler( JdbcConfiguration configuration )
+    public OrganisationUnitGroupBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupMemberBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupMemberBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/OrganisationUnitGroupMemberBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.importexport.GroupMemberAssociation;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public OrganisationUnitGroupMemberBatchHandler( JdbcConfiguration configuration )
+    public OrganisationUnitGroupMemberBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, true, true );
+        super( dataSource, dialect, true, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/PeriodBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/PeriodBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/PeriodBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.period.Period;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
 
-    public PeriodBatchHandler( JdbcConfiguration configuration )
+    public PeriodBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, true );
+        super( dataSource, dialect, false, true );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java	2010-06-23 17:50:25 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/ReportTableBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.reporttable.ReportTable;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public ReportTableBatchHandler( JdbcConfiguration configuration )
+    public ReportTableBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/SourceBatchHandler.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/SourceBatchHandler.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/batchhandler/SourceBatchHandler.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
+import javax.sql.DataSource;
+
+import org.amplecode.quick.StatementDialect;
 import org.amplecode.quick.batchhandler.AbstractBatchHandler;
 import org.hisp.dhis.source.Source;
 
@@ -42,9 +44,9 @@
     // Constructor
     // -------------------------------------------------------------------------
  
-    public SourceBatchHandler( JdbcConfiguration configuration )
+    public SourceBatchHandler( DataSource dataSource, StatementDialect dialect )
     {
-        super( configuration, false, false );
+        super( dataSource, dialect, false, false );
     }
 
     // -------------------------------------------------------------------------

=== removed directory 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration'
=== removed file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/configuration/JdbcConfigurationFactoryBean.java	1970-01-01 00:00:00 +0000
@@ -1,129 +0,0 @@
-package org.hisp.dhis.jdbc.configuration;
-
-/*
- * Copyright (c) 2004-2010, University of Oslo
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright notice, this
- *   list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright notice,
- *   this list of conditions and the following disclaimer in the documentation
- *   and/or other materials provided with the distribution.
- * * Neither the name of the HISP project nor the names of its contributors may
- *   be used to endorse or promote products derived from this software without
- *   specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-import org.amplecode.quick.JdbcConfiguration;
-import org.amplecode.quick.StatementDialect;
-import org.hibernate.cfg.Configuration;
-import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
-import org.springframework.beans.factory.FactoryBean;
-
-/**
- * @author Lars Helge Overland
- * @version $Id: DefaultJDBCConfigurationProvider.java 5714 2008-09-17 13:05:36Z larshelg $
- */
-public class JdbcConfigurationFactoryBean
-    implements FactoryBean<JdbcConfiguration>
-{
-    private static final String KEY_DIALECT = "hibernate.dialect";
-    private static final String KEY_DRIVER = "hibernate.connection.driver_class";
-    private static final String KEY_CONNECTION_URL = "hibernate.connection.url";
-    private static final String KEY_USERNAME = "hibernate.connection.username";
-    private static final String KEY_PASSWORD = "hibernate.connection.password";
-    
-    private static final String DIALECT_MYSQL = "org.hibernate.dialect.MySQLDialect";
-    private static final String DIALECT_POSTGRESQL = "org.hibernate.dialect.PostgreSQLDialect";
-    private static final String DIALECT_H2 = "org.hibernate.dialect.H2Dialect";
-    private static final String DIALECT_H2_PATCHED = "org.hisp.dhis.dialect.H2Dialect";
-    private static final String DIALECT_DERBY = "org.hibernate.dialect.DerbyDialect";
-    private static final String DIALECT_DERBY_PATCHED = "org.hisp.dhis.dialect.IdentityDerbyDialect";
-        
-    // -------------------------------------------------------------------------
-    // Dependencies
-    // -------------------------------------------------------------------------
-    
-    private HibernateConfigurationProvider hibernateConfigurationProvider;
-    
-    public void setHibernateConfigurationProvider( HibernateConfigurationProvider hibernateConfigurationProvider )
-    {
-        this.hibernateConfigurationProvider = hibernateConfigurationProvider;
-    }
-
-    private JdbcConfiguration jdbcConfig;
-
-    // -------------------------------------------------------------------------
-    // Initialisation
-    // -------------------------------------------------------------------------
-    
-    public void init()
-    {
-        Configuration hibernateConfiguration = hibernateConfigurationProvider.getConfiguration();
-        
-        JdbcConfiguration config = new JdbcConfiguration();
-        
-        String dialect = hibernateConfiguration.getProperty( KEY_DIALECT );
-        
-        if ( dialect.equals( DIALECT_MYSQL ) )
-        {
-            config.setDialect( StatementDialect.MYSQL );
-        }
-        else if ( dialect.equals( DIALECT_POSTGRESQL ) )
-        {
-            config.setDialect( StatementDialect.POSTGRESQL );
-        }
-        else if ( dialect.equals( DIALECT_H2 ) || dialect.equals( DIALECT_H2_PATCHED ) )
-        {
-            config.setDialect( StatementDialect.H2 );
-        }
-        else if ( dialect.equals( DIALECT_DERBY ) || dialect.equals( DIALECT_DERBY_PATCHED ) )
-        {
-            config.setDialect( StatementDialect.DERBY );
-        }
-        else
-        {
-            throw new RuntimeException( "Unsupported dialect: " + hibernateConfiguration.getProperty( KEY_DIALECT ) );
-        }
-        
-        config.setDriverClass( hibernateConfiguration.getProperty( KEY_DRIVER ) );            
-        config.setConnectionUrl( hibernateConfiguration.getProperty( KEY_CONNECTION_URL ) );
-        config.setUsername( hibernateConfiguration.getProperty( KEY_USERNAME ) );
-        config.setPassword( hibernateConfiguration.getProperty( KEY_PASSWORD ) );
-        
-        this.jdbcConfig = config;
-    }
-
-    // -------------------------------------------------------------------------
-    // FactoryBean implementation
-    // -------------------------------------------------------------------------
-    
-    public JdbcConfiguration getObject()
-        throws Exception
-    {
-        return jdbcConfig;
-    }
-
-    public Class<JdbcConfiguration> getObjectType()
-    {
-        return JdbcConfiguration.class;
-    }
-
-    public boolean isSingleton()
-    {
-        return true;
-    }
-}

=== added directory 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect'
=== added file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect/StatementDialectFactoryBean.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect/StatementDialectFactoryBean.java	1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/dialect/StatementDialectFactoryBean.java	2010-11-10 13:45:42 +0000
@@ -0,0 +1,112 @@
+package org.hisp.dhis.jdbc.dialect;
+
+/*
+ * Copyright (c) 2004-2010, University of Oslo
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this
+ *   list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * * Neither the name of the HISP project nor the names of its contributors may
+ *   be used to endorse or promote products derived from this software without
+ *   specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.amplecode.quick.StatementDialect;
+import org.hibernate.cfg.Configuration;
+import org.hisp.dhis.hibernate.HibernateConfigurationProvider;
+import org.springframework.beans.factory.FactoryBean;
+
+/**
+ * @author Lars Helge Overland
+ */
+public class StatementDialectFactoryBean
+    implements FactoryBean<StatementDialect>
+{
+    private static final String KEY_DIALECT = "hibernate.dialect";
+    
+    private static Map<String, StatementDialect> dialectMap;
+    
+    static
+    {
+        dialectMap = new HashMap<String, StatementDialect>();
+        dialectMap.put( "org.hibernate.dialect.MySQLDialect", StatementDialect.MYSQL );
+        dialectMap.put( "org.hibernate.dialect.PostgreSQLDialect", StatementDialect.POSTGRESQL );
+        dialectMap.put( "org.hibernate.dialect.H2Dialect", StatementDialect.H2 );
+        dialectMap.put( "org.hisp.dhis.dialect.H2Dialect", StatementDialect.H2 );
+        dialectMap.put( "org.hibernate.dialect.DerbyDialect", StatementDialect.DERBY );
+        dialectMap.put( "org.hisp.dhis.dialect.IdentityDerbyDialect", StatementDialect.DERBY );
+    }
+    
+    // -------------------------------------------------------------------------
+    // Dependencies
+    // -------------------------------------------------------------------------
+    
+    private HibernateConfigurationProvider hibernateConfigurationProvider;
+    
+    public void setHibernateConfigurationProvider( HibernateConfigurationProvider hibernateConfigurationProvider )
+    {
+        this.hibernateConfigurationProvider = hibernateConfigurationProvider;
+    }
+
+    private StatementDialect statementDialect;
+    
+    // -------------------------------------------------------------------------
+    // Initialisation
+    // -------------------------------------------------------------------------
+    
+    public void init()
+    {
+        Configuration hibernateConfiguration = hibernateConfigurationProvider.getConfiguration();
+        
+        String dialect = hibernateConfiguration.getProperty( KEY_DIALECT );
+        
+        this.statementDialect = dialectMap.get( dialect );
+        
+        if ( this.statementDialect == null )
+        {
+            throw new RuntimeException( "Unsupported dialect: " + dialect );
+        }
+    }
+
+    // -------------------------------------------------------------------------
+    // FactoryBean implementation
+    // -------------------------------------------------------------------------
+        
+    @Override
+    public StatementDialect getObject()
+        throws Exception
+    {
+        return this.statementDialect;
+    }
+
+    @Override
+    public Class<?> getObjectType()
+    {
+        return StatementDialect.class;
+    }
+
+    @Override
+    public boolean isSingleton()
+    {
+        return true;
+    }
+}

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/StatementBuilderFactoryBean.java'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/StatementBuilderFactoryBean.java	2010-05-10 17:50:39 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/java/org/hisp/dhis/jdbc/statementbuilder/StatementBuilderFactoryBean.java	2010-11-10 13:45:42 +0000
@@ -27,7 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.amplecode.quick.JdbcConfiguration;
 import org.amplecode.quick.StatementDialect;
 import org.hisp.dhis.jdbc.StatementBuilder;
 import org.springframework.beans.factory.FactoryBean;
@@ -43,13 +42,13 @@
     // Dependencies
     // -------------------------------------------------------------------------
     
-    private JdbcConfiguration jdbcConfiguration;
-
-    public void setJdbcConfiguration( JdbcConfiguration jdbcConfiguration )
+    private StatementDialect statementDialect;
+    
+    public void setStatementDialect( StatementDialect statementDialect )
     {
-        this.jdbcConfiguration = jdbcConfiguration;
+        this.statementDialect = statementDialect;
     }
-    
+
     private StatementBuilder statementBuilder;
 
     // -------------------------------------------------------------------------
@@ -58,27 +57,25 @@
     
     public void init()
     {
-        StatementDialect dialect = jdbcConfiguration.getDialect();
-        
-        if ( dialect.equals( StatementDialect.MYSQL ) )
+        if ( statementDialect.equals( StatementDialect.MYSQL ) )
         {
             this.statementBuilder = new MySQLStatementBuilder();
         }
-        else if ( dialect.equals( StatementDialect.POSTGRESQL ) )
+        else if ( statementDialect.equals( StatementDialect.POSTGRESQL ) )
         {
             this.statementBuilder = new PostgreSQLStatementBuilder();
         }
-        else if ( dialect.equals( StatementDialect.H2 ) )
+        else if ( statementDialect.equals( StatementDialect.H2 ) )
         {
             this.statementBuilder = new H2StatementBuilder();
         }
-        else if ( dialect.equals( StatementDialect.DERBY ) )
+        else if ( statementDialect.equals( StatementDialect.DERBY ) )
         {
             this.statementBuilder = new DerbyStatementBuilder();
         }
         else
         {
-            throw new RuntimeException( "Unsupported dialect: " + dialect.toString() );
+            throw new RuntimeException( "Unsupported dialect: " + statementDialect.toString() );
         }
     }
 

=== modified file 'dhis-2/dhis-support/dhis-support-jdbc/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-support/dhis-support-jdbc/src/main/resources/META-INF/dhis/beans.xml	2010-10-29 12:19:15 +0000
+++ dhis-2/dhis-support/dhis-support-jdbc/src/main/resources/META-INF/dhis/beans.xml	2010-11-10 13:45:42 +0000
@@ -7,13 +7,14 @@
   <!-- StatementManager -->
     
   <bean id="statementManager" class="org.amplecode.quick.statement.JdbcStatementManager">
-    <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
+    <property name="dataSource" ref="dataSource"/>
   </bean>
   
   <!-- BatchHandlerFactory -->
     
   <bean id="batchHandlerFactory" class="org.amplecode.quick.factory.DefaultBatchHandlerFactory">
-    <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
+    <property name="dataSource" ref="dataSource"/>
+	<property name="statementDialect" ref="statementDialect"/>
   </bean>
   
   <!-- Interceptor -->
@@ -22,16 +23,16 @@
     <property name="statementManager" ref="statementManager"/>
   </bean>
     
-  <!-- JdbcConfiguration -->
+  <!-- StatementDialect -->
     
-  <bean id="jdbcConfiguration" class="org.hisp.dhis.jdbc.configuration.JdbcConfigurationFactoryBean" init-method="init">
+  <bean id="statementDialect" class="org.hisp.dhis.jdbc.dialect.StatementDialectFactoryBean" init-method="init">
 	<property name="hibernateConfigurationProvider" ref="hibernateConfigurationProvider"/>
   </bean>
     
   <!-- StatementBuilder -->
     
   <bean id="statementBuilder" class="org.hisp.dhis.jdbc.statementbuilder.StatementBuilderFactoryBean" init-method="init">
-    <property name="jdbcConfiguration" ref="jdbcConfiguration"/>
+    <property name="statementDialect" ref="statementDialect"/>
   </bean>
     
 </beans>
\ No newline at end of file

=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml	2010-11-03 04:34:08 +0000
+++ dhis-2/pom.xml	2010-11-10 13:45:42 +0000
@@ -375,7 +375,7 @@
       <dependency>
         <groupId>org.amplecode</groupId>
         <artifactId>quick</artifactId>
-        <version>1.1.8</version>
+        <version>1.2</version>
       </dependency>
       <dependency>
         <groupId>com.lowagie</groupId>