ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgbut...@apache.org
Subject svn commit: r678576 [3/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
Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/BaseHierarchicalJava2Test.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/BaseHierarchicalJava2Test.java?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/BaseHierarchicalJava2Test.java (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/BaseHierarchicalJava2Test.java Mon Jul 21 14:30:05 2008
@@ -0,0 +1,61 @@
+package ibatortest.execute.hierarchical.java2;
+
+import ibatortest.BaseTest;
+import ibatortest.generated.hierarchical.java2.dao.AwfulTableDAO;
+import ibatortest.generated.hierarchical.java2.dao.AwfulTableDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAO;
+import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAO;
+import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.PkblobsDAO;
+import ibatortest.generated.hierarchical.java2.dao.PkblobsDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAO;
+import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAO;
+import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAOImpl;
+import ibatortest.generated.hierarchical.java2.dao.PkonlyDAO;
+import ibatortest.generated.hierarchical.java2.dao.PkonlyDAOImpl;
+
+public class BaseHierarchicalJava2Test extends BaseTest {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        initSqlMapClient(
+                "ibatortest/execute/hierarchical/java2/SqlMapConfig.xml", null);
+    }
+    
+    protected FieldsonlyDAO getFieldsonlyDAO() {
+        FieldsonlyDAOImpl dao = new FieldsonlyDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkonlyDAO getPkonlyDAO() {
+        PkonlyDAOImpl dao = new PkonlyDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkfieldsDAO getPkfieldsDAO() {
+        PkfieldsDAOImpl dao = new PkfieldsDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkblobsDAO getPkblobsDAO() {
+        PkblobsDAOImpl dao = new PkblobsDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected PkfieldsblobsDAO getPkfieldsblobsDAO() {
+        PkfieldsblobsDAOImpl dao = new PkfieldsblobsDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected FieldsblobsDAO getFieldsblobsDAO() {
+        FieldsblobsDAOImpl dao = new FieldsblobsDAOImpl(getSqlMapClient());
+        return dao;
+    }
+
+    protected AwfulTableDAO getAwfulTableDAO() {
+        AwfulTableDAOImpl dao = new AwfulTableDAOImpl(getSqlMapClient());
+        return dao;
+    }
+}

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/HierarchicalJava2Tests.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/HierarchicalJava2Tests.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/HierarchicalJava2Tests.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/HierarchicalJava2Tests.java Mon Jul 21 14:30:05 2008
@@ -16,27 +16,13 @@
 
 package ibatortest.execute.hierarchical.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.hierarchical.java2.dao.AwfulTableDAO;
-import ibatortest.generated.hierarchical.java2.dao.AwfulTableDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAO;
-import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkonlyDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkonlyDAOImpl;
 import ibatortest.generated.hierarchical.java2.model.AwfulTable;
 import ibatortest.generated.hierarchical.java2.model.AwfulTableExample;
 import ibatortest.generated.hierarchical.java2.model.AwfulTableKey;
@@ -58,20 +44,20 @@
 import ibatortest.generated.hierarchical.java2.model.PkonlyExample;
 import ibatortest.generated.hierarchical.java2.model.PkonlyKey;
 
+import java.math.BigDecimal;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 /**
  * @author Jeff Butler
  * 
  */
-public class HierarchicalJava2Tests extends BaseTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initSqlMapClient(
-                "ibatortest/execute/hierarchical/java2/SqlMapConfig.xml", null);
-    }
+public class HierarchicalJava2Tests extends BaseHierarchicalJava2Test {
 
     public void testFieldsOnlyInsert() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -98,7 +84,7 @@
     }
 
     public void testFieldsOnlySelectByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -134,7 +120,7 @@
     }
 
     public void testFieldsOnlySelectByExampleNoCriteria() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -166,7 +152,7 @@
     }
 
     public void testFieldsOnlyDeleteByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -202,7 +188,7 @@
     }
 
     public void testFieldsOnlyCountByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -238,7 +224,7 @@
     }
 
     public void testPKOnlyInsert() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -259,7 +245,7 @@
     }
 
     public void testPKOnlyDeleteByPrimaryKey() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -290,7 +276,7 @@
     }
 
     public void testPKOnlyDeleteByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -322,7 +308,7 @@
     }
 
     public void testPKOnlySelectByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -350,7 +336,7 @@
     }
 
     public void testPKOnlySelectByExampleNoCriteria() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -378,7 +364,7 @@
     }
 
     public void testPKOnlyCountByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -410,7 +396,7 @@
     }
 
     public void testPKFieldsInsert() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -459,7 +445,7 @@
     }
 
     public void testPKFieldsUpdateByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -492,7 +478,7 @@
     }
 
     public void testPKFieldsUpdateByPrimaryKeySelective() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -544,7 +530,7 @@
     }
 
     public void testPKfieldsDeleteByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -571,7 +557,7 @@
     }
 
     public void testPKFieldsDeleteByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -607,7 +593,7 @@
     }
 
     public void testPKFieldsSelectByPrimaryKey() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -640,7 +626,7 @@
     }
 
     public void testPKFieldsSelectByExampleLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -705,7 +691,7 @@
     }
 
     public void testPKFieldsSelectByExampleNotLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -770,7 +756,7 @@
     }
 
     public void testPKFieldsSelectByExampleComplexLike() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -834,7 +820,7 @@
     }
 
     public void testPKFieldsSelectByExampleIn() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -907,7 +893,7 @@
     }
 
     public void testPKFieldsSelectByExampleBetween() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -964,7 +950,7 @@
     }
 
     public void testPKFieldsSelectByExampleNoCriteria() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1021,7 +1007,7 @@
     }
 
     public void testPKFieldsSelectByExampleEscapedFields() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1089,7 +1075,7 @@
     }
 
     public void testPKFieldsCountByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
 
         try {
             Pkfields record = new Pkfields();
@@ -1121,7 +1107,7 @@
     }
 
     public void testPKBlobsInsert() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1146,7 +1132,7 @@
     }
 
     public void testPKBlobsUpdateByPrimaryKeyWithBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1177,7 +1163,7 @@
     }
 
     public void testPKBlobsUpdateByPrimaryKeySelective() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1207,7 +1193,7 @@
     }
 
     public void testPKBlobsDeleteByPrimaryKey() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1234,7 +1220,7 @@
     }
 
     public void testPKBlobsDeleteByExample() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1267,7 +1253,7 @@
     }
 
     public void testPKBlobsSelectByPrimaryKey() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1295,7 +1281,7 @@
     }
 
     public void testPKBlobsSelectByExampleWithoutBlobs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1325,7 +1311,7 @@
     }
 
     public void testPKBlobsSelectByExampleWithoutBlobsNoCriteria() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1351,7 +1337,7 @@
     }
 
     public void testPKBlobsSelectByExampleWithBlobs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1382,7 +1368,7 @@
     }
 
     public void testPKBlobsCountByExample() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1411,7 +1397,7 @@
     }
 
     public void testPKFieldsBlobsInsert() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1440,7 +1426,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeyWithBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1477,7 +1463,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeyWithoutBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1512,7 +1498,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByPrimaryKeySelective() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1548,7 +1534,7 @@
     }
 
     public void testPKFieldsBlobsDeleteByPrimaryKey() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1586,7 +1572,7 @@
     }
 
     public void testPKFieldsBlobsDeleteByExample() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1623,7 +1609,7 @@
     }
 
     public void testPKFieldsBlobsSelectByPrimaryKey() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1661,7 +1647,7 @@
     }
 
     public void testPKFieldsBlobsSelectByExampleWithoutBlobs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1697,7 +1683,7 @@
     }
 
     public void testPKFieldsBlobsSelectByExampleWithBlobs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1734,7 +1720,7 @@
     }
 
     public void testPKFieldsBlobsSelectByExampleWithBlobsNoCriteria() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1763,7 +1749,7 @@
     }
 
     public void testPKFieldsBlobsCountByExample() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1796,7 +1782,7 @@
     }
 
     public void testFieldsBlobsInsert() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1824,7 +1810,7 @@
     }
 
     public void testFieldsBlobsDeleteByExample() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1859,7 +1845,7 @@
     }
 
     public void testFieldsBlobsSelectByExampleWithoutBlobs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1891,7 +1877,7 @@
     }
 
     public void testFieldsBlobsSelectByExampleWithBlobs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1925,7 +1911,7 @@
     }
 
     public void testFieldsBlobsSelectByExampleWithBlobsNoCriteria() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1952,7 +1938,7 @@
     }
 
     public void testFieldsBlobsCountByExample() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
 
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -1983,7 +1969,7 @@
     }
 
     public void testAwfulTableInsert() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2035,7 +2021,7 @@
     }
 
     public void testAwfulTableUpdateByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2091,7 +2077,7 @@
     }
 
     public void testAwfulTableUpdateByPrimaryKeySelective() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2149,7 +2135,7 @@
     }
 
     public void testAwfulTableDeleteByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2183,7 +2169,7 @@
     }
 
     public void testAwfulTableDeleteByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2238,7 +2224,7 @@
     }
 
     public void testAwfulTableSelectByPrimaryKey() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2306,7 +2292,7 @@
     }
 
     public void testAwfulTableSelectByExampleLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2425,7 +2411,7 @@
     }
 
     public void testAwfulTableSelectByExampleNotLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2544,7 +2530,7 @@
     }
     
     public void testAwfulTableSelectByExampleComplexLike() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2661,7 +2647,7 @@
     }
 
     public void testAwfulTableSelectByExampleIn() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2782,7 +2768,7 @@
     }
 
     public void testAwfulTableSelectByExampleBetween() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -2891,7 +2877,7 @@
     }
 
     public void testAwfulTableSelectByExampleNoCriteria() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();
@@ -3014,7 +3000,7 @@
     }
 
     public void testAwfulTableCountByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
 
         try {
             AwfulTable record = new AwfulTable();

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/UpdateByExampleTests.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/UpdateByExampleTests.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/UpdateByExampleTests.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java2/UpdateByExampleTests.java Mon Jul 21 14:30:05 2008
@@ -16,24 +16,13 @@
 
 package ibatortest.execute.hierarchical.java2;
 
-import java.sql.SQLException;
-import java.util.List;
-
-import ibatortest.BaseTest;
 import ibatortest.generated.hierarchical.java2.dao.AwfulTableDAO;
-import ibatortest.generated.hierarchical.java2.dao.AwfulTableDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.FieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAO;
-import ibatortest.generated.hierarchical.java2.dao.FieldsonlyDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkfieldsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkfieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java2.dao.PkonlyDAO;
-import ibatortest.generated.hierarchical.java2.dao.PkonlyDAOImpl;
 import ibatortest.generated.hierarchical.java2.model.AwfulTable;
 import ibatortest.generated.hierarchical.java2.model.AwfulTableExample;
 import ibatortest.generated.hierarchical.java2.model.Fieldsblobs;
@@ -52,22 +41,18 @@
 import ibatortest.generated.hierarchical.java2.model.PkonlyExample;
 import ibatortest.generated.hierarchical.java2.model.PkonlyKey;
 
+import java.sql.SQLException;
+import java.util.List;
+
 /**
  * 
  * @author Jeff Butler
  *
  */
-public class UpdateByExampleTests extends BaseTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initSqlMapClient(
-                "ibatortest/execute/hierarchical/java2/SqlMapConfig.xml",
-                null);
-    }
+public class UpdateByExampleTests extends BaseHierarchicalJava2Test {
 
     public void testFieldsOnlyUpdateByExampleSelective() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -128,7 +113,7 @@
     }
 
     public void testFieldsOnlyUpdateByExample() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -171,7 +156,7 @@
     }
 
     public void testPKOnlyUpdateByExampleSelective() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -217,7 +202,7 @@
     }
 
     public void testPKOnlyUpdateByExample() {
-        PkonlyDAO dao = new PkonlyDAOImpl(sqlMapClient);
+        PkonlyDAO dao = getPkonlyDAO();
 
         try {
             PkonlyKey key = new PkonlyKey();
@@ -257,7 +242,7 @@
     }
 
     public void testPKFieldsUpdateByExampleSelective() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
     
         try {
             Pkfields record = new Pkfields();
@@ -297,7 +282,7 @@
     }
 
     public void testPKFieldsUpdateByExample() {
-        PkfieldsDAO dao = new PkfieldsDAOImpl(sqlMapClient);
+        PkfieldsDAO dao = getPkfieldsDAO();
     
         try {
             Pkfields record = new Pkfields();
@@ -342,7 +327,7 @@
     }
 
     public void testPKBlobsUpdateByExampleSelective() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -379,7 +364,7 @@
     }
 
     public void testPKBlobsUpdateByExampleWithoutBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -416,7 +401,7 @@
     }
 
     public void testPKBlobsUpdateByExampleWithBLOBs() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
     
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -453,7 +438,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByExampleSelective() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -496,7 +481,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByExampleWithoutBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -541,7 +526,7 @@
     }
 
     public void testPKFieldsBlobsUpdateByExampleWithBLOBs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
     
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -586,7 +571,7 @@
     }
 
     public void testFieldsBlobsUpdateByExampleSelective() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -625,7 +610,7 @@
     }
 
     public void testFieldsBlobsUpdateByExampleWithoutBLOBs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -665,7 +650,7 @@
     }
 
     public void testFieldsBlobsUpdateByExampleWithBLOBs() {
-        FieldsblobsDAO dao = new FieldsblobsDAOImpl(sqlMapClient);
+        FieldsblobsDAO dao = getFieldsblobsDAO();
     
         try {
             FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
@@ -705,7 +690,7 @@
     }
 
     public void testAwfulTableUpdateByExampleSelective() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
     
         try {
             AwfulTable record = new AwfulTable();
@@ -775,7 +760,7 @@
     }
 
     public void testAwfulTableUpdateByExample() {
-        AwfulTableDAO dao = new AwfulTableDAOImpl(sqlMapClient);
+        AwfulTableDAO dao = getAwfulTableDAO();
     
         try {
             AwfulTable record = new AwfulTable();

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/BaseHierarchicalJava5Test.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/BaseHierarchicalJava5Test.java?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/BaseHierarchicalJava5Test.java (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/BaseHierarchicalJava5Test.java Mon Jul 21 14:30:05 2008
@@ -0,0 +1,70 @@
+package ibatortest.execute.hierarchical.java5;
+
+import ibatortest.BaseTest;
+import ibatortest.generated.hierarchical.java5.dao.AwfulTableDAO;
+import ibatortest.generated.hierarchical.java5.dao.FieldsblobsDAO;
+import ibatortest.generated.hierarchical.java5.dao.FieldsonlyDAO;
+import ibatortest.generated.hierarchical.java5.dao.PkblobsDAO;
+import ibatortest.generated.hierarchical.java5.dao.PkfieldsDAO;
+import ibatortest.generated.hierarchical.java5.dao.PkfieldsblobsDAO;
+import ibatortest.generated.hierarchical.java5.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 BaseHierarchicalJava5Test extends BaseTest {
+    protected void setUp() throws Exception {
+        super.setUp();
+    }
+
+    protected FieldsonlyDAO getFieldsonlyDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        FieldsonlyDAO dao = (FieldsonlyDAO) factory.getBean("FieldsonlyDAO");
+        return dao;
+    }
+
+    protected PkonlyDAO getPkonlyDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        PkonlyDAO dao = (PkonlyDAO) factory.getBean("PkonlyDAO");
+        return dao;
+    }
+
+    protected PkfieldsDAO getPkfieldsDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        PkfieldsDAO dao = (PkfieldsDAO) factory.getBean("PkfieldsDAO");
+        return dao;
+    }
+
+    protected PkblobsDAO getPkblobsDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        PkblobsDAO dao = (PkblobsDAO) factory.getBean("PkblobsDAO");
+        return dao;
+    }
+
+    protected PkfieldsblobsDAO getPkfieldsblobsDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        PkfieldsblobsDAO dao = (PkfieldsblobsDAO) factory.getBean("PkfieldsblobsDAO");
+        return dao;
+    }
+
+    protected FieldsblobsDAO getFieldsblobsDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        FieldsblobsDAO dao = (FieldsblobsDAO) factory.getBean("FieldsblobsDAO");
+        return dao;
+    }
+
+    protected AwfulTableDAO getAwfulTableDAO() {
+        Resource res = new ClassPathResource("/ibatortest/execute/hierarchical/java5/SpringBeans.xml");
+        BeanFactory factory = new XmlBeanFactory(res);
+        AwfulTableDAO dao = (AwfulTableDAO) factory.getBean("AwfulTableDAO");
+        return dao;
+    }
+}

Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/HierarchicalJava5Tests.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/HierarchicalJava5Tests.java?rev=678576&r1=678575&r2=678576&view=diff
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/HierarchicalJava5Tests.java (original)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/HierarchicalJava5Tests.java Mon Jul 21 14:30:05 2008
@@ -16,27 +16,13 @@
 
 package ibatortest.execute.hierarchical.java5;
 
-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.hierarchical.java5.dao.AwfulTableDAO;
-import ibatortest.generated.hierarchical.java5.dao.AwfulTableDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.FieldsblobsDAO;
-import ibatortest.generated.hierarchical.java5.dao.FieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.FieldsonlyDAO;
-import ibatortest.generated.hierarchical.java5.dao.FieldsonlyDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.PkblobsDAO;
-import ibatortest.generated.hierarchical.java5.dao.PkblobsDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.PkfieldsDAO;
-import ibatortest.generated.hierarchical.java5.dao.PkfieldsDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.PkfieldsblobsDAO;
-import ibatortest.generated.hierarchical.java5.dao.PkfieldsblobsDAOImpl;
 import ibatortest.generated.hierarchical.java5.dao.PkonlyDAO;
-import ibatortest.generated.hierarchical.java5.dao.PkonlyDAOImpl;
 import ibatortest.generated.hierarchical.java5.model.AwfulTable;
 import ibatortest.generated.hierarchical.java5.model.AwfulTableExample;
 import ibatortest.generated.hierarchical.java5.model.AwfulTableKey;
@@ -58,20 +44,19 @@
 import ibatortest.generated.hierarchical.java5.model.PkonlyExample;
 import ibatortest.generated.hierarchical.java5.model.PkonlyKey;
 
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
 /**
  * @author Jeff Butler
  * 
  */
-public class HierarchicalJava5Tests extends BaseTest {
-
-    protected void setUp() throws Exception {
-        super.setUp();
-        initSqlMapClient(
-                "ibatortest/execute/hierarchical/java5/SqlMapConfig.xml", null);
-    }
+public class HierarchicalJava5Tests extends BaseHierarchicalJava5Test {
 
     public void testFieldsOnlyInsert() {
-        FieldsonlyDAO dao = new FieldsonlyDAOImpl(sqlMapClient);
+        FieldsonlyDAO dao = getFieldsonlyDAO();
 
         try {
             Fieldsonly record = new Fieldsonly();
@@ -92,13 +77,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();
@@ -128,13 +113,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();
@@ -160,13 +145,13 @@
 
             List<Fieldsonly> 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();
@@ -196,13 +181,13 @@
             example = new FieldsonlyExample();
             List<Fieldsonly> 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();
@@ -231,13 +216,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();
@@ -252,13 +237,13 @@
             PkonlyKey returnedRecord = 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();
@@ -283,13 +268,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();
@@ -315,13 +300,13 @@
             example = new PkonlyExample();
             List<PkonlyKey> 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();
@@ -343,13 +328,13 @@
             example.createCriteria().andIdGreaterThan(4);
             List<PkonlyKey> 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();
@@ -371,13 +356,13 @@
             example.createCriteria();
             List<PkonlyKey> 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();
@@ -403,13 +388,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();
@@ -452,13 +437,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();
@@ -485,13 +470,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();
@@ -537,13 +522,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();
@@ -564,13 +549,13 @@
             PkfieldsExample example = new PkfieldsExample();
             List<Pkfields> 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();
@@ -600,13 +585,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();
@@ -633,13 +618,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();
@@ -698,13 +683,13 @@
             returnedRecord = 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();
@@ -763,13 +748,13 @@
             returnedRecord = 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();
@@ -827,13 +812,13 @@
             returnedRecord = 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();
@@ -900,13 +885,13 @@
             returnedRecord = 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();
@@ -957,13 +942,13 @@
             example.setOrderByClause("ID1, ID2");
             List<Pkfields> 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();
@@ -1014,13 +999,13 @@
             example.setOrderByClause("ID1, ID2");
             List<Pkfields> 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();
@@ -1082,13 +1067,13 @@
             example.setOrderByClause("ID1, ID2");
             List<Pkfields> 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();
@@ -1114,13 +1099,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1140,13 +1125,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1171,13 +1156,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1201,13 +1186,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1228,13 +1213,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1261,13 +1246,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1289,13 +1274,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1319,13 +1304,13 @@
             PkblobsKey key = answer.get(0);
             assertFalse(key instanceof PkblobsWithBLOBs);
             assertEquals(6, key.getId().intValue());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKBlobsSelectByExampleWithoutBlobsNoCriteria() {
-        PkblobsDAO dao = new PkblobsDAOImpl(sqlMapClient);
+        PkblobsDAO dao = getPkblobsDAO();
 
         try {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1345,13 +1330,13 @@
             List<PkblobsKey> 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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1377,13 +1362,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 {
             PkblobsWithBLOBs record = new PkblobsWithBLOBs();
@@ -1406,13 +1391,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1435,13 +1420,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1472,13 +1457,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1507,13 +1492,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1543,13 +1528,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1582,13 +1567,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1620,13 +1605,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1659,13 +1644,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1696,13 +1681,13 @@
             assertEquals(record.getId2(), newRecord.getId2());
             assertEquals(record.getFirstname(), newRecord.getFirstname());
             assertEquals(record.getLastname(), newRecord.getLastname());
-        } catch (SQLException e) {
+        } catch (Exception e) {
             fail(e.getMessage());
         }
     }
 
     public void testPKFieldsBlobsSelectByExampleWithBlobs() {
-        PkfieldsblobsDAO dao = new PkfieldsblobsDAOImpl(sqlMapClient);
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
 
         try {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1733,13 +1718,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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1762,13 +1747,13 @@
             example.createCriteria();
             List<PkfieldsblobsWithBLOBs> 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 {
             PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
@@ -1795,13 +1780,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();
@@ -1823,13 +1808,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();
@@ -1858,13 +1843,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();
@@ -1890,13 +1875,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();
@@ -1924,13 +1909,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();
@@ -1951,13 +1936,13 @@
             example.createCriteria();
             List<FieldsblobsWithBLOBs> 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();
@@ -1982,13 +1967,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();
@@ -2034,13 +2019,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();
@@ -2090,13 +2075,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();
@@ -2148,13 +2133,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();
@@ -2182,13 +2167,13 @@
             AwfulTableExample example = new AwfulTableExample();
             List<AwfulTable> 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();
@@ -2237,13 +2222,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();
@@ -2305,13 +2290,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();
@@ -2424,13 +2409,13 @@
             returnedRecord = 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();
@@ -2543,13 +2528,13 @@
             returnedRecord = 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();
@@ -2660,13 +2645,13 @@
             returnedRecord = 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();
@@ -2781,13 +2766,13 @@
             returnedRecord = 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();
@@ -2890,13 +2875,13 @@
             example.createCriteria().andId1Between(1, 1000);
             List<AwfulTable> 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();
@@ -3013,13 +2998,13 @@
             assertEquals(11, returnedRecord.getId1().intValue());
             returnedRecord = 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();
@@ -3064,7 +3049,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/hierarchical/java5/SpringBeans.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SpringBeans.xml?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SpringBeans.xml (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/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/hierarchical/java5/SqlMapConfig_spring.xml"/>
+    <property name="dataSource" ref="dataSource"/>
+  </bean>
+
+  <bean id="FieldsonlyDAO" class="ibatortest.generated.hierarchical.java5.dao.FieldsonlyDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkonlyDAO" class="ibatortest.generated.hierarchical.java5.dao.PkonlyDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkfieldsDAO" class="ibatortest.generated.hierarchical.java5.dao.PkfieldsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkblobsDAO" class="ibatortest.generated.hierarchical.java5.dao.PkblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="PkfieldsblobsDAO" class="ibatortest.generated.hierarchical.java5.dao.PkfieldsblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="FieldsblobsDAO" class="ibatortest.generated.hierarchical.java5.dao.FieldsblobsDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+  <bean id="AwfulTableDAO" class="ibatortest.generated.hierarchical.java5.dao.AwfulTableDAOImpl">
+    <property name="sqlMapClient" ref="sqlMapClient" />
+  </bean>
+  
+</beans>

Added: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SqlMapConfig_spring.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SqlMapConfig_spring.xml?rev=678576&view=auto
==============================================================================
--- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/SqlMapConfig_spring.xml (added)
+++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/execute/hierarchical/java5/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/hierarchical/java5/xml/FIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/FIELDSONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/PKBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/PKFIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/PKONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/hierarchical/java5/xml/awful table_SqlMap.xml" />
+
+</sqlMapConfig>



Mime
View raw message