ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgbut...@apache.org
Subject svn commit: r678576 [1/4] - in /ibatis/trunk/java/tools/ibator/core: build/ devlib/ testJava5/ testJava5/ibatortest/ testJava5/ibatortest/execute/conditional/java2/ testJava5/ibatortest/execute/conditional/java5/ testJava5/ibatortest/execute/flat/java2...
Date Mon, 21 Jul 2008 21:30:07 GMT
Author: jgbutler
Date: Mon Jul 21 14:30:05 2008
New Revision: 678576

URL: http://svn.apache.org/viewvc?rev=678576&view=rev
Log:
Ibator: update to ibatis 2.3.3, also add some test cases for Spring 2.5.5

Added:
    ibatis/trunk/java/tools/ibator/core/devlib/commons-logging-1.1.1.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720-src.zip   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/spring-beans-2.5.5.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/spring-core-2.5.5.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/spring-jdbc-2.5.5.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/spring-orm-2.5.5.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/devlib/spring-tx-2.5.5.jar   (with props)
    ibatis/trunk/java/tools/ibator/core/testJava5/commons-logging.properties
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/BaseConditionalJava2Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SpringBeans.xml
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/BaseConditionalJava5Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java2/BaseFlatJava2Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java5/BaseFlatJava5Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/BaseHierarchicalJava2Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/BaseHierarchicalJava5Test.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SpringBeans.xml
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SqlMapConfig_spring.xml
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/miscellaneous/BaseMiscellaneousTest.java
Removed:
    ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.1.710-src.zip
    ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.1.710.jar
Modified:
    ibatis/trunk/java/tools/ibator/core/build/build.xml
    ibatis/trunk/java/tools/ibator/core/build/version.properties
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/BaseTest.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/ConditionalJava2Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/ConditionalJava5Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java2/FlatJava2Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java2/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java5/FlatJava5Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/flat/java5/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/HierarchicalJava2Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/HierarchicalJava5Tests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/UpdateByExampleTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/miscellaneous/MiscellaneousTests.java
    ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/ibatorConfig.xml

Modified: ibatis/trunk/java/tools/ibator/core/build/build.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/build/build.xml?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/build/build.xml (original)
+++ ibatis/trunk/java/tools/ibator/core/build/build.xml Mon Jul 21 14:30:05 2008
@@ -332,7 +332,7 @@
       </batchtest>
       <classpath>
       	<pathelement location="${generated.bin.dir.java2}"/>
-		<pathelement location="${basedir}/../devlib/ibatis-2.3.1.710.jar" />
+		<pathelement location="${basedir}/../devlib/ibatis-2.3.3.720.jar" />
 		<pathelement location="${basedir}/../devlib/hsqldb1.8.0.7.jar" />
       </classpath>
     </junit>
@@ -348,8 +348,14 @@
       </batchtest>
       <classpath>
       	<pathelement location="${generated.bin.dir.java5}"/>
-		<pathelement location="${basedir}/../devlib/ibatis-2.3.1.710.jar" />
+		<pathelement location="${basedir}/../devlib/ibatis-2.3.3.720.jar" />
 		<pathelement location="${basedir}/../devlib/hsqldb1.8.0.7.jar" />
+		<pathelement location="${basedir}/../devlib/commons-logging-1.1.1.jar" />
+		<pathelement location="${basedir}/../devlib/spring-beans-2.5.5.jar" />
+		<pathelement location="${basedir}/../devlib/spring-core-2.5.5.jar" />
+		<pathelement location="${basedir}/../devlib/spring-jdbc-2.5.5.jar" />
+		<pathelement location="${basedir}/../devlib/spring-orm-2.5.5.jar" />
+		<pathelement location="${basedir}/../devlib/spring-tx-2.5.5.jar" />
       </classpath>
     </junit>
   </target>

Modified: ibatis/trunk/java/tools/ibator/core/build/version.properties
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/build/version.properties?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/build/version.properties (original)
+++ ibatis/trunk/java/tools/ibator/core/build/version.properties Mon Jul 21 14:30:05 2008
@@ -1,4 +1,4 @@
 #ibator build version info
-#Thu Jul 17 11:33:46 CDT 2008
+#Mon Jul 21 16:20:16 CDT 2008
 version=1.2.0
-buildNum=560
+buildNum=566

Added: ibatis/trunk/java/tools/ibator/core/devlib/commons-logging-1.1.1.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/commons-logging-1.1.1.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/commons-logging-1.1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720-src.zip
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720-src.zip?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720-src.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/ibatis-2.3.3.720.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/spring-beans-2.5.5.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/spring-beans-2.5.5.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/spring-beans-2.5.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/spring-core-2.5.5.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/spring-core-2.5.5.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/spring-core-2.5.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/spring-jdbc-2.5.5.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/spring-jdbc-2.5.5.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/spring-jdbc-2.5.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/spring-orm-2.5.5.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/spring-orm-2.5.5.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/spring-orm-2.5.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/devlib/spring-tx-2.5.5.jar
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/devlib/spring-tx-2.5.5.jar?rev=678576&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ibatis/trunk/java/tools/ibator/core/devlib/spring-tx-2.5.5.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ibatis/trunk/java/tools/ibator/core/testJava5/commons-logging.properties
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/commons-logging.properties?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/commons-logging.properties (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/commons-logging.properties Mon Jul 21 14:30:05 2008
@@ -0,0 +1,2 @@
+/* turn off logging from Spring */
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/BaseTest.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/BaseTest.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/BaseTest.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/BaseTest.java Mon Jul 21 14:30:05 2008
@@ -38,11 +38,11 @@
  */
 public abstract class BaseTest extends TestCase {
 
-    protected static SqlMapClient sqlMapClient;
+    private SqlMapClient sqlMapClient;
     private static DateFormat dateOnlyFormat = SimpleDateFormat.getDateInstance();
     private static DateFormat timeOnlyFormat = SimpleDateFormat.getTimeInstance();
 
-    protected static void initSqlMapClient(String configFile, Properties props) throws Exception {
+    protected void initSqlMapClient(String configFile, Properties props) throws Exception {
         Reader reader = Resources.getResourceAsReader(configFile);
         sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(reader, props);
         reader.close();
@@ -131,4 +131,8 @@
         return timeOnlyFormat.format(date1).equals(timeOnlyFormat.format(date2));
         
     }
+
+    protected SqlMapClient getSqlMapClient() {
+        return sqlMapClient;
+    }
 }

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/BaseConditionalJava2Test.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/BaseConditionalJava2Test.java?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/BaseConditionalJava2Test.java (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/BaseConditionalJava2Test.java Mon Jul 21 14:30:05 2008
@@ -0,0 +1,64 @@
+package ibatortest.execute.conditional.java2;
+
+import ibatortest.BaseTest;
+import ibatortest.generated.conditional.java2.dao.AwfulTableDAO;
+import ibatortest.generated.conditional.java2.dao.FieldsblobsDAO;
+import ibatortest.generated.conditional.java2.dao.FieldsonlyDAO;
+import ibatortest.generated.conditional.java2.dao.PkblobsDAO;
+import ibatortest.generated.conditional.java2.dao.PkfieldsDAO;
+import ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAO;
+import ibatortest.generated.conditional.java2.dao.PkonlyDAO;
+
+import org.springframework.beans.factory.BeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanFactory;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+
+public class BaseConditionalJava2Test extends BaseTest {
+    
+    private BeanFactory factory;
+
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+    
+    public BaseConditionalJava2Test() {
+        Resource res = new ClassPathResource("/ibatortest/execute/conditional/java2/SpringBeans.xml");
+        factory = new XmlBeanFactory(res);
+    }
+
+    protected FieldsonlyDAO getFieldsonlyDAO() {
+        FieldsonlyDAO dao = (FieldsonlyDAO) factory.getBean("FieldsonlyDAO");
+        return dao;
+    }
+    
+    protected PkonlyDAO getPkonlyDAO() {
+        PkonlyDAO dao = (PkonlyDAO) factory.getBean("PkonlyDAO");
+        return dao;
+    }
+
+    protected PkfieldsDAO getPkfieldsDAO() {
+        PkfieldsDAO dao = (PkfieldsDAO) factory.getBean("PkfieldsDAO");
+        return dao;
+    }
+
+    protected PkblobsDAO getPkblobsDAO() {
+        PkblobsDAO dao = (PkblobsDAO) factory.getBean("PkblobsDAO");
+        return dao;
+    }
+
+    protected PkfieldsblobsDAO getPkfieldsblobsDAO() {
+        PkfieldsblobsDAO dao = (PkfieldsblobsDAO) factory.getBean("PkfieldsblobsDAO");
+        return dao;
+    }
+
+    protected FieldsblobsDAO getFieldsblobsDAO() {
+        FieldsblobsDAO dao = (FieldsblobsDAO) factory.getBean("FieldsblobsDAO");
+        return dao;
+    }
+
+    protected AwfulTableDAO getAwfulTableDAO() {
+        AwfulTableDAO dao = (AwfulTableDAO) factory.getBean("AwfulTableDAO");
+        return dao;
+    }
+}

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/ConditionalJava2Tests.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/ConditionalJava2Tests.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/ConditionalJava2Tests.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/ConditionalJava2Tests.java Mon Jul 21 14:30:05 2008
@@ -16,27 +16,13 @@
 
 package ibatortest.execute.conditional.java2;
 
-import java.math.BigDecimal;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import ibatortest.BaseTest;
 import ibatortest.generated.conditional.java2.dao.AwfulTableDAO;
-import ibatortest.generated.conditional.java2.dao.AwfulTableDAOImpl;
 import ibatortest.generated.conditional.java2.dao.FieldsblobsDAO;
-import ibatortest.generated.conditional.java2.dao.FieldsblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.FieldsonlyDAO;
-import ibatortest.generated.conditional.java2.dao.FieldsonlyDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkblobsDAO;
-import ibatortest.generated.conditional.java2.dao.PkblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkfieldsDAO;
-import ibatortest.generated.conditional.java2.dao.PkfieldsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAO;
-import ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkonlyDAO;
-import ibatortest.generated.conditional.java2.dao.PkonlyDAOImpl;
 import ibatortest.generated.conditional.java2.model.AwfulTable;
 import ibatortest.generated.conditional.java2.model.AwfulTableExample;
 import ibatortest.generated.conditional.java2.model.Fieldsblobs;
@@ -55,20 +41,19 @@
 import ibatortest.generated.conditional.java2.model.PkonlyExample;
 import ibatortest.generated.conditional.java2.model.PkonlyKey;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 /**
  * @author Jeff Butler
  * 
  */
-public class ConditionalJava2Tests extends BaseTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initSqlMapClient(
-                "ibatortest/execute/conditional/java2/SqlMapConfig.xml", null);
-    }
+public class ConditionalJava2Tests extends BaseConditionalJava2Test {
 
     public void testFieldsOnlyInsert() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -89,13 +74,13 @@
             assertEquals(record.getDoublefield(), returnedRecord
                     .getDoublefield());
             assertEquals(record.getFloatfield(), returnedRecord.getFloatfield());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsOnlySelectByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -125,13 +110,13 @@
             example = new FieldsonlyExample();
             answer = dao.selectByExample(example);
             assertEquals(3, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsOnlySelectByExampleNoCriteria() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -157,13 +142,13 @@
 
             List answer = dao.selectByExample(example);
             assertEquals(3, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsOnlyDeleteByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -193,13 +178,13 @@
             example = new FieldsonlyExample();
             List answer = dao.selectByExample(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsOnlyCountByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -228,13 +213,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(3, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
     
     public void testPKOnlyInsert() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -249,13 +234,13 @@
             PkonlyKey returnedRecord = (PkonlyKey) answer.get(0);
             assertEquals(key.getId(), returnedRecord.getId());
             assertEquals(key.getSeqNum(), returnedRecord.getSeqNum());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlyDeleteByPrimaryKey() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -280,13 +265,13 @@
 
             answer = dao.selectByExample(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlyDeleteByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -312,13 +297,13 @@
             example = new PkonlyExample();
             List answer = dao.selectByExample(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlySelectByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -340,13 +325,13 @@
             example.createCriteria().andIdGreaterThan(4);
             List answer = dao.selectByExample(example);
             assertEquals(2, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlySelectByExampleNoCriteria() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -368,13 +353,13 @@
             example.createCriteria();
             List answer = dao.selectByExample(example);
             assertEquals(3, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlyCountByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -400,13 +385,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(3, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsInsert() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -449,13 +434,13 @@
                     .getTimefield()));
             assertEquals(record.getTimestampfield(), returnedRecord
                     .getTimestampfield());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsUpdateByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -482,13 +467,13 @@
             assertEquals(record.getLastname(), record2.getLastname());
             assertEquals(record.getId1(), record2.getId1());
             assertEquals(record.getId2(), record2.getId2());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsUpdateByPrimaryKeySelective() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -534,13 +519,13 @@
                     .getTimefield()));
             assertEquals(record.getTimestampfield(), returnedRecord
                     .getTimestampfield());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKfieldsDeleteByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -561,13 +546,13 @@
             PkfieldsExample example = new PkfieldsExample();
             List answer = dao.selectByExample(example);
             assertEquals(0, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsDeleteByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -597,13 +582,13 @@
             example = new PkfieldsExample();
             answer = dao.selectByExample(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -630,13 +615,13 @@
             assertEquals(record.getLastname(), newRecord.getLastname());
             assertEquals(record.getId1(), newRecord.getId1());
             assertEquals(record.getId2(), newRecord.getId2());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -695,13 +680,13 @@
             returnedRecord = (Pkfields) answer.get(2);
             assertEquals(2, returnedRecord.getId1().intValue());
             assertEquals(3, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleNotLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -760,13 +745,13 @@
             returnedRecord = (Pkfields) answer.get(2);
             assertEquals(1, returnedRecord.getId1().intValue());
             assertEquals(3, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleComplexLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -824,13 +809,13 @@
             returnedRecord = (Pkfields) answer.get(1);
             assertEquals(2, returnedRecord.getId1().intValue());
             assertEquals(3, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleIn() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -897,13 +882,13 @@
             returnedRecord = (Pkfields) answer.get(3);
             assertEquals(2, returnedRecord.getId1().intValue());
             assertEquals(3, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleBetween() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -954,13 +939,13 @@
             example.setOrderByClause("ID1, ID2");
             List answer = dao.selectByExample(example);
             assertEquals(6, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleNoCriteria() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1011,13 +996,13 @@
             example.setOrderByClause("ID1, ID2");
             List answer = dao.selectByExample(example);
             assertEquals(6, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsSelectByExampleEscapedFields() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1079,13 +1064,13 @@
             example.setOrderByClause("ID1, ID2");
             List answer = dao.selectByExample(example);
             assertEquals(2, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsCountByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1111,13 +1096,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(2, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsInsert() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1136,13 +1121,13 @@
                     .getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord
                     .getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsUpdateByPrimaryKeyWithBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1163,13 +1148,13 @@
             assertEquals(record.getId(), newRecord.getId());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsUpdateByPrimaryKeySelective() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1190,13 +1175,13 @@
                     .getBlob1()));
             assertTrue(blobsAreEqual(newRecord.getBlob2(), returnedRecord
                     .getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsDeleteByPrimaryKey() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1215,13 +1200,13 @@
             example = new PkblobsExample();
             answer = dao.selectByExampleWithoutBLOBs(example);
             assertEquals(0, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsDeleteByExample() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1248,13 +1233,13 @@
             example = new PkblobsExample();
             answer = dao.selectByExampleWithoutBLOBs(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsSelectByPrimaryKey() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1274,13 +1259,13 @@
             assertEquals(record.getId(), newRecord.getId());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsSelectByExampleWithoutBlobs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1305,13 +1290,13 @@
             assertEquals(6, key.getId().intValue());
             assertNull(key.getBlob1());
             assertNull(key.getBlob2());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsSelectByExampleWithoutBlobsNoCriteria() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1331,13 +1316,13 @@
             List answer = dao.selectByExampleWithoutBLOBs(example);
 
             assertEquals(2, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsSelectByExampleWithBlobs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1362,13 +1347,13 @@
             assertEquals(record.getId(), newRecord.getId());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsCountByExample() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             Pkblobs record = new Pkblobs();
@@ -1391,13 +1376,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(2, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsInsert() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1419,13 +1404,13 @@
             assertEquals(record.getLastname(), returnedRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord
                     .getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeyWithBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1456,13 +1441,13 @@
             assertEquals(record.getId2(), newRecord.getId2());
             assertTrue(blobsAreEqual(updateRecord.getBlob1(), newRecord
                     .getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeyWithoutBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1491,13 +1476,13 @@
             assertEquals(record.getId1(), newRecord.getId1());
             assertEquals(record.getId2(), newRecord.getId2());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeySelective() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1527,13 +1512,13 @@
             assertEquals(record.getId2(), returnedRecord.getId2());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord
                     .getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsDeleteByPrimaryKey() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1565,13 +1550,13 @@
             example = new PkfieldsblobsExample();
             answer = dao.selectByExampleWithoutBLOBs(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsDeleteByExample() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1602,13 +1587,13 @@
             example = new PkfieldsblobsExample();
             answer = dao.selectByExampleWithoutBLOBs(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsSelectByPrimaryKey() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1640,13 +1625,13 @@
             assertEquals(record.getFirstname(), newRecord.getFirstname());
             assertEquals(record.getLastname(), newRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsSelectByExampleWithoutBlobs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1676,13 +1661,13 @@
             assertEquals(record.getFirstname(), newRecord.getFirstname());
             assertEquals(record.getLastname(), newRecord.getLastname());
             assertNull(newRecord.getBlob1());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsSelectByExampleWithBlobs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1712,13 +1697,13 @@
             assertEquals(record.getFirstname(), newRecord.getFirstname());
             assertEquals(record.getLastname(), newRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsSelectByExampleWithBlobsNoCriteria() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1741,13 +1726,13 @@
             example.createCriteria();
             List answer = dao.selectByExampleWithBLOBs(example);
             assertEquals(2, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsCountByExample() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -1774,13 +1759,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(2, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsInsert() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1802,13 +1787,13 @@
                     .getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord
                     .getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsDeleteByExample() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1837,13 +1822,13 @@
             example = new FieldsblobsExample();
             answer = dao.selectByExampleWithoutBLOBs(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsSelectByExampleWithoutBlobs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1869,13 +1854,13 @@
             assertFalse(newRecord instanceof FieldsblobsWithBLOBs);
             assertEquals(record.getFirstname(), newRecord.getFirstname());
             assertEquals(record.getLastname(), newRecord.getLastname());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsSelectByExampleWithBlobs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1903,13 +1888,13 @@
             assertEquals(record.getLastname(), newRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), newRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), newRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsSelectByExampleWithBlobsNoCriteria() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1930,13 +1915,13 @@
             example.createCriteria();
             List answer = dao.selectByExampleWithBLOBs(example);
             assertEquals(2, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsCountByExample() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1961,13 +1946,13 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(2, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableInsert() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2012,13 +1997,13 @@
                     .getSecondFirstName());
             assertEquals(record.getThirdFirstName(), returnedRecord
                     .getThirdFirstName());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableUpdateByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2066,13 +2051,13 @@
                     .getSecondFirstName());
             assertEquals(record.getThirdFirstName(), returnedRecord
                     .getThirdFirstName());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableUpdateByPrimaryKeySelective() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2122,13 +2107,13 @@
                     .getSecondFirstName());
             assertEquals(record.getThirdFirstName(), returnedRecord
                     .getThirdFirstName());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableDeleteByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2154,13 +2139,13 @@
             AwfulTableExample example = new AwfulTableExample();
             List answer = dao.selectByExample(example);
             assertEquals(0, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableDeleteByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2209,13 +2194,13 @@
             example.clear();
             answer = dao.selectByExample(example);
             assertEquals(1, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2275,13 +2260,13 @@
                     .getSecondFirstName());
             assertEquals(record.getThirdFirstName(), returnedRecord
                     .getThirdFirstName());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByExampleLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2394,13 +2379,13 @@
             returnedRecord = (AwfulTable) answer.get(2);
             assertEquals(111111, returnedRecord.getId1().intValue());
             assertEquals(222222, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByExampleNotLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2513,13 +2498,13 @@
             returnedRecord = (AwfulTable) answer.get(2);
             assertEquals(111, returnedRecord.getId1().intValue());
             assertEquals(222, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
     
     public void testAwfulTableSelectByExampleComplexLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2630,13 +2615,13 @@
             returnedRecord = (AwfulTable) answer.get(1);
             assertEquals(111111, returnedRecord.getId1().intValue());
             assertEquals(222222, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByExampleIn() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2751,13 +2736,13 @@
             returnedRecord = (AwfulTable) answer.get(1);
             assertEquals(11, returnedRecord.getId1().intValue());
             assertEquals(22, returnedRecord.getId2().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByExampleBetween() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2860,13 +2845,13 @@
             example.createCriteria().andId1Between(1, 1000);
             List answer = dao.selectByExample(example);
             assertEquals(3, answer.size());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableSelectByExampleNoCriteria() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2983,13 +2968,13 @@
             assertEquals(11, returnedRecord.getId1().intValue());
             returnedRecord = (AwfulTable) answer.get(5);
             assertEquals(1, returnedRecord.getId1().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableCountByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -3034,7 +3019,7 @@
             example.clear();
             rows = dao.countByExample(example);
             assertEquals(2, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SpringBeans.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SpringBeans.xml?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SpringBeans.xml (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SpringBeans.xml Mon Jul 21 14:30:05 2008
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
+
+  <bean id="dataSource" class="com.ibatis.common.jdbc.SimpleDataSource">
+    <constructor-arg>
+      <map>
+        <entry key="JDBC.Driver"><value>org.hsqldb.jdbcDriver</value></entry>
+        <entry key="JDBC.ConnectionURL"><value>jdbc:hsqldb:mem:aname</value></entry>
+        <entry key="JDBC.Username"><value>sa</value></entry>
+        <entry key="JDBC.Password"><value></value></entry>
+        <entry key="JDBC.DefaultAutoCommit"><value>true</value></entry>
+      </map> 
+    </constructor-arg>
+  </bean>
+
+  <bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
+    <property name="configLocation" value="classpath:/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml"/>
+    <property name="dataSource" ref="dataSource"/>
+  </bean>
+
+  <bean id="FieldsonlyDAO" class="ibatortest.generated.conditional.java2.dao.FieldsonlyDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkonlyDAO" class="ibatortest.generated.conditional.java2.dao.PkonlyDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkfieldsDAO" class="ibatortest.generated.conditional.java2.dao.PkfieldsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkblobsDAO" class="ibatortest.generated.conditional.java2.dao.PkblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkfieldsblobsDAO" class="ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="FieldsblobsDAO" class="ibatortest.generated.conditional.java2.dao.FieldsblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="AwfulTableDAO" class="ibatortest.generated.conditional.java2.dao.AwfulTableDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+</beans>

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/SqlMapConfig_spring.xml Mon Jul 21 14:30:05 2008
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sqlMapConfig
+  PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
+  "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
+
+<sqlMapConfig>
+
+  <settings useStatementNamespaces="true" />
+
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/FIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/FIELDSONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/PKBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/PKFIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/PKONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java2/xml/awful table_SqlMap.xml" />
+
+</sqlMapConfig>

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/UpdateByExampleTests.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/UpdateByExampleTests.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/UpdateByExampleTests.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java2/UpdateByExampleTests.java Mon Jul 21 14:30:05 2008
@@ -16,24 +16,13 @@
 
 package ibatortest.execute.conditional.java2;
 
-import java.sql.SQLException;
-import java.util.List;
-
-import ibatortest.BaseTest;
 import ibatortest.generated.conditional.java2.dao.AwfulTableDAO;
-import ibatortest.generated.conditional.java2.dao.AwfulTableDAOImpl;
 import ibatortest.generated.conditional.java2.dao.FieldsblobsDAO;
-import ibatortest.generated.conditional.java2.dao.FieldsblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.FieldsonlyDAO;
-import ibatortest.generated.conditional.java2.dao.FieldsonlyDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkblobsDAO;
-import ibatortest.generated.conditional.java2.dao.PkblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkfieldsDAO;
-import ibatortest.generated.conditional.java2.dao.PkfieldsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAO;
-import ibatortest.generated.conditional.java2.dao.PkfieldsblobsDAOImpl;
 import ibatortest.generated.conditional.java2.dao.PkonlyDAO;
-import ibatortest.generated.conditional.java2.dao.PkonlyDAOImpl;
 import ibatortest.generated.conditional.java2.model.AwfulTable;
 import ibatortest.generated.conditional.java2.model.AwfulTableExample;
 import ibatortest.generated.conditional.java2.model.Fieldsblobs;
@@ -50,22 +39,17 @@
 import ibatortest.generated.conditional.java2.model.PkonlyExample;
 import ibatortest.generated.conditional.java2.model.PkonlyKey;
 
+import java.util.List;
+
 /**
  * 
  * @author Jeff Butler
  *
  */
-public class UpdateByExampleTests extends BaseTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initSqlMapClient(
-                "ibatortest/execute/conditional/java2/SqlMapConfig.xml",
-                null);
-    }
+public class UpdateByExampleTests extends BaseConditionalJava2Test {
 
     public void testFieldsOnlyUpdateByExampleSelective() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -120,13 +104,13 @@
             assertEquals(record.getDoublefield(), 99d);
             assertEquals(record.getFloatfield(), 100.111);
             assertEquals(record.getIntegerfield().intValue(), 9);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsOnlyUpdateByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -163,13 +147,13 @@
             assertNull(record.getDoublefield());
             assertNull(record.getFloatfield());
             assertEquals(record.getIntegerfield().intValue(), 22);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlyUpdateByExampleSelective() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -209,13 +193,13 @@
             
             rows = dao.countByExample(example);
             assertEquals(1, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKOnlyUpdateByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -249,13 +233,13 @@
             
             rows = dao.countByExample(example);
             assertEquals(1, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsUpdateByExampleSelective() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
     
         try {
             Pkfields record = new Pkfields();
@@ -289,13 +273,13 @@
     
             rows = dao.countByExample(example);
             assertEquals(1, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsUpdateByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
     
         try {
             Pkfields record = new Pkfields();
@@ -334,13 +318,13 @@
     
             rows = dao.countByExample(example);
             assertEquals(1, rows);
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsUpdateByExampleSelective() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             Pkblobs record = new Pkblobs();
@@ -371,13 +355,13 @@
             assertEquals(6, returnedRecord.getId().intValue());
             assertTrue(blobsAreEqual(newRecord.getBlob1(), returnedRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsUpdateByExampleWithoutBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             Pkblobs record = new Pkblobs();
@@ -408,13 +392,13 @@
             assertEquals(8, returnedRecord.getId().intValue());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsUpdateByExampleWithBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             Pkblobs record = new Pkblobs();
@@ -445,13 +429,13 @@
             assertEquals(8, returnedRecord.getId().intValue());
             assertNull(returnedRecord.getBlob1());
             assertNull(returnedRecord.getBlob2());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByExampleSelective() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -488,13 +472,13 @@
             assertEquals(record.getLastname(), returnedRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
             
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByExampleWithoutBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -533,13 +517,13 @@
             assertNull(returnedRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
             
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsUpdateByExampleWithBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             Pkfieldsblobs record = new Pkfieldsblobs();
@@ -578,13 +562,13 @@
             assertNull(returnedRecord.getLastname());
             assertNull(returnedRecord.getBlob1());
             
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsUpdateByExampleSelective() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -617,13 +601,13 @@
             assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsUpdateByExampleWithoutBLOBs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -657,13 +641,13 @@
             assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
             assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
             assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testFieldsBlobsUpdateByExampleWithBLOBs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -697,13 +681,13 @@
             assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
             assertNull(returnedRecord.getBlob1());
             assertNull(returnedRecord.getBlob2());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableUpdateByExampleSelective() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
     
         try {
             AwfulTable record = new AwfulTable();
@@ -767,13 +751,13 @@
             assertEquals(record.getSecondFirstName(), returnedRecord.getSecondFirstName());
             assertEquals(record.getThirdFirstName(), returnedRecord.getThirdFirstName());
             
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testAwfulTableUpdateByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
     
         try {
             AwfulTable record = new AwfulTable();
@@ -844,7 +828,7 @@
             assertNull(returnedRecord.getSecondCustomerId());
             assertNull(returnedRecord.getSecondFirstName());
             assertNull(returnedRecord.getThirdFirstName());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/BaseConditionalJava5Test.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/BaseConditionalJava5Test.java?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/BaseConditionalJava5Test.java (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/conditional/java5/BaseConditionalJava5Test.java Mon Jul 21 14:30:05 2008
@@ -0,0 +1,68 @@
+package ibatortest.execute.conditional.java5;
+
+import ibatortest.BaseTest;
+import ibatortest.generated.conditional.java5.dao.AwfulTableDAO;
+import ibatortest.generated.conditional.java5.dao.AwfulTableDAOImpl;
+import ibatortest.generated.conditional.java5.dao.FieldsblobsDAO;
+import ibatortest.generated.conditional.java5.dao.FieldsblobsDAOImpl;
+import ibatortest.generated.conditional.java5.dao.FieldsonlyDAO;
+import ibatortest.generated.conditional.java5.dao.FieldsonlyDAOImpl;
+import ibatortest.generated.conditional.java5.dao.PkblobsDAO;
+import ibatortest.generated.conditional.java5.dao.PkblobsDAOImpl;
+import ibatortest.generated.conditional.java5.dao.PkfieldsDAO;
+import ibatortest.generated.conditional.java5.dao.PkfieldsDAOImpl;
+import ibatortest.generated.conditional.java5.dao.PkfieldsblobsDAO;
+import ibatortest.generated.conditional.java5.dao.PkfieldsblobsDAOImpl;
+import ibatortest.generated.conditional.java5.dao.PkonlyDAO;
+import ibatortest.generated.conditional.java5.dao.PkonlyDAOImpl;
+
+public class BaseConditionalJava5Test extends BaseTest {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        initSqlMapClient(
+                "ibatortest/execute/conditional/java5/SqlMapConfig.xml", null);
+    }
+    
+    protected FieldsonlyDAO getFieldsonlyDAO() {
+        FieldsonlyDAOImpl dao = new FieldsonlyDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+    
+    protected PkonlyDAO getPkonlyDAO() {
+        PkonlyDAOImpl dao = new PkonlyDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkfieldsDAO getPkfieldsDAO() {
+        PkfieldsDAOImpl dao = new PkfieldsDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkblobsDAO getPkblobsDAO() {
+        PkblobsDAOImpl dao = new PkblobsDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkfieldsblobsDAO getPkfieldsblobsDAO() {
+        PkfieldsblobsDAOImpl dao = new PkfieldsblobsDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+
+    protected FieldsblobsDAO getFieldsblobsDAO() {
+        FieldsblobsDAOImpl dao = new FieldsblobsDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+
+    protected AwfulTableDAO getAwfulTableDAO() {
+        AwfulTableDAOImpl dao = new AwfulTableDAOImpl();
+        dao.setSqlMapClient(getSqlMapClient());
+        return dao;
+    }
+}



Mime
View raw message