ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgbut...@apache.org
Subject svn commit: r833772 [24/25] - in /ibatis/java/ibator/trunk/core: ./ ibator-core/doc/ ibator-core/doc/html/ ibator-core/doc/html/configreference/ ibator-core/doc/html/generatedobjects/ ibator-core/doc/html/reference/ ibator-core/doc/html/usage/ ibator-m...
Date Sat, 07 Nov 2009 22:59:05 GMT
Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/hierarchical/java5/UpdateByExampleTest.java
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/hierarchical/java5/UpdateByExampleTest.java?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/hierarchical/java5/UpdateByExampleTest.java (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/hierarchical/java5/UpdateByExampleTest.java Sat Nov  7 22:59:00 2009
@@ -0,0 +1,837 @@
+/*
+ *  Copyright 2007 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package ibatortest.execute.hierarchical.java5;
+
+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 ibatortest.generated.hierarchical.java5.model.AwfulTable;
+import ibatortest.generated.hierarchical.java5.model.AwfulTableExample;
+import ibatortest.generated.hierarchical.java5.model.Fieldsblobs;
+import ibatortest.generated.hierarchical.java5.model.FieldsblobsExample;
+import ibatortest.generated.hierarchical.java5.model.FieldsblobsWithBLOBs;
+import ibatortest.generated.hierarchical.java5.model.Fieldsonly;
+import ibatortest.generated.hierarchical.java5.model.FieldsonlyExample;
+import ibatortest.generated.hierarchical.java5.model.PkblobsExample;
+import ibatortest.generated.hierarchical.java5.model.PkblobsKey;
+import ibatortest.generated.hierarchical.java5.model.PkblobsWithBLOBs;
+import ibatortest.generated.hierarchical.java5.model.Pkfields;
+import ibatortest.generated.hierarchical.java5.model.PkfieldsExample;
+import ibatortest.generated.hierarchical.java5.model.Pkfieldsblobs;
+import ibatortest.generated.hierarchical.java5.model.PkfieldsblobsExample;
+import ibatortest.generated.hierarchical.java5.model.PkfieldsblobsWithBLOBs;
+import ibatortest.generated.hierarchical.java5.model.PkonlyExample;
+import ibatortest.generated.hierarchical.java5.model.PkonlyKey;
+
+import java.util.List;
+
+/**
+ * 
+ * @author Jeff Butler
+ *
+ */
+public class UpdateByExampleTest extends AbstractHierarchicalJava5Test {
+
+    public void testFieldsOnlyUpdateByExampleSelective() {
+        FieldsonlyDAO dao = getFieldsonlyDAO();
+
+        try {
+            Fieldsonly record = new Fieldsonly();
+            record.setDoublefield(11.22);
+            record.setFloatfield(33.44);
+            record.setIntegerfield(5);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setDoublefield(44.55);
+            record.setFloatfield(66.77);
+            record.setIntegerfield(8);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setDoublefield(88.99);
+            record.setFloatfield(100.111);
+            record.setIntegerfield(9);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setDoublefield(99d);
+            FieldsonlyExample example = new FieldsonlyExample();
+            example.createCriteria().andIntegerfieldGreaterThan(5);
+            
+            int rows = dao.updateByExampleSelective(record, example);
+            assertEquals(2, rows);
+
+            example.clear();
+            example.createCriteria().andIntegerfieldEqualTo(5);
+            List<Fieldsonly> answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+            record = answer.get(0);
+            assertEquals(record.getDoublefield(), 11.22);
+            assertEquals(record.getFloatfield(), 33.44);
+            assertEquals(record.getIntegerfield().intValue(), 5);
+            
+            example.clear();
+            example.createCriteria().andIntegerfieldEqualTo(8);
+            answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+            record = (Fieldsonly) answer.get(0);
+            assertEquals(record.getDoublefield(), 99d);
+            assertEquals(record.getFloatfield(), 66.77);
+            assertEquals(record.getIntegerfield().intValue(), 8);
+            
+            example.clear();
+            example.createCriteria().andIntegerfieldEqualTo(9);
+            answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+            record = (Fieldsonly) answer.get(0);
+            assertEquals(record.getDoublefield(), 99d);
+            assertEquals(record.getFloatfield(), 100.111);
+            assertEquals(record.getIntegerfield().intValue(), 9);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testFieldsOnlyUpdateByExample() {
+        FieldsonlyDAO dao = getFieldsonlyDAO();
+
+        try {
+            Fieldsonly record = new Fieldsonly();
+            record.setDoublefield(11.22);
+            record.setFloatfield(33.44);
+            record.setIntegerfield(5);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setDoublefield(44.55);
+            record.setFloatfield(66.77);
+            record.setIntegerfield(8);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setDoublefield(88.99);
+            record.setFloatfield(100.111);
+            record.setIntegerfield(9);
+            dao.insert(record);
+
+            record = new Fieldsonly();
+            record.setIntegerfield(22);
+            FieldsonlyExample example = new FieldsonlyExample();
+            example.createCriteria().andIntegerfieldEqualTo(5);
+            
+            int rows = dao.updateByExample(record, example);
+            assertEquals(1, rows);
+
+            example.clear();
+            example.createCriteria().andIntegerfieldEqualTo(22);
+            List<Fieldsonly> answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+            record = answer.get(0);
+            assertNull(record.getDoublefield());
+            assertNull(record.getFloatfield());
+            assertEquals(record.getIntegerfield().intValue(), 22);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKOnlyUpdateByExampleSelective() {
+        PkonlyDAO dao = getPkonlyDAO();
+
+        try {
+            PkonlyKey key = new PkonlyKey();
+            key.setId(1);
+            key.setSeqNum(3);
+            dao.insert(key);
+
+            key = new PkonlyKey();
+            key.setId(5);
+            key.setSeqNum(6);
+            dao.insert(key);
+
+            key = new PkonlyKey();
+            key.setId(7);
+            key.setSeqNum(8);
+            dao.insert(key);
+
+            PkonlyExample example = new PkonlyExample();
+            example.createCriteria().andIdGreaterThan(4);
+            key = new PkonlyKey();
+            key.setSeqNum(3);
+            int rows = dao.updateByExampleSelective(key, example);
+            assertEquals(2, rows);
+
+            example.clear();
+            example.createCriteria()
+                .andIdEqualTo(5)
+                .andSeqNumEqualTo(3);
+            
+            rows = dao.countByExample(example);
+            assertEquals(1, rows);
+            
+            example.clear();
+            example.createCriteria()
+                .andIdEqualTo(7)
+                .andSeqNumEqualTo(3);
+            
+            rows = dao.countByExample(example);
+            assertEquals(1, rows);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKOnlyUpdateByExample() {
+        PkonlyDAO dao = getPkonlyDAO();
+
+        try {
+            PkonlyKey key = new PkonlyKey();
+            key.setId(1);
+            key.setSeqNum(3);
+            dao.insert(key);
+
+            key = new PkonlyKey();
+            key.setId(5);
+            key.setSeqNum(6);
+            dao.insert(key);
+
+            key = new PkonlyKey();
+            key.setId(7);
+            key.setSeqNum(8);
+            dao.insert(key);
+
+            PkonlyExample example = new PkonlyExample();
+            example.createCriteria()
+                .andIdEqualTo(7);
+            key = new PkonlyKey();
+            key.setSeqNum(3);
+            key.setId(22);
+            int rows = dao.updateByExample(key, example);
+            assertEquals(1, rows);
+
+            example.clear();
+            example.createCriteria()
+                .andIdEqualTo(22)
+                .andSeqNumEqualTo(3);
+            
+            rows = dao.countByExample(example);
+            assertEquals(1, rows);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKFieldsUpdateByExampleSelective() {
+        PkfieldsDAO dao = getPkfieldsDAO();
+    
+        try {
+            Pkfields record = new Pkfields();
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insert(record);
+    
+            record = new Pkfields();
+            record.setFirstname("Bob");
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+    
+            dao.insert(record);
+
+            record = new Pkfields();
+            record.setFirstname("Fred");
+            PkfieldsExample example = new PkfieldsExample();
+            example.createCriteria().andLastnameLike("J%");
+            int rows = dao.updateByExampleSelective(record, example);
+            assertEquals(1, rows);
+            
+            example.clear();
+            example.createCriteria()
+                .andFirstnameEqualTo("Fred")
+                .andLastnameEqualTo("Jones")
+                .andId1EqualTo(3)
+                .andId2EqualTo(4);
+    
+            rows = dao.countByExample(example);
+            assertEquals(1, rows);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKFieldsUpdateByExample() {
+        PkfieldsDAO dao = getPkfieldsDAO();
+    
+        try {
+            Pkfields record = new Pkfields();
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insert(record);
+    
+            record = new Pkfields();
+            record.setFirstname("Bob");
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+    
+            dao.insert(record);
+
+            record = new Pkfields();
+            record.setFirstname("Fred");
+            record.setId1(3);
+            record.setId2(4);
+            PkfieldsExample example = new PkfieldsExample();
+            example.createCriteria()
+                .andId1EqualTo(3)
+                .andId2EqualTo(4);
+            
+            int rows = dao.updateByExample(record, example);
+            assertEquals(1, rows);
+            
+            example.clear();
+            example.createCriteria()
+                .andFirstnameEqualTo("Fred")
+                .andLastnameIsNull()
+                .andId1EqualTo(3)
+                .andId2EqualTo(4);
+    
+            rows = dao.countByExample(example);
+            assertEquals(1, rows);
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKBlobsUpdateByExampleSelective() {
+        PkblobsDAO dao = getPkblobsDAO();
+    
+        try {
+            PkblobsWithBLOBs record = new PkblobsWithBLOBs();
+            record.setId(3);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkblobsWithBLOBs();
+            record.setId(6);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            PkblobsWithBLOBs newRecord = new PkblobsWithBLOBs();
+            newRecord.setBlob1(generateRandomBlob());
+            
+            PkblobsExample example = new PkblobsExample();
+            example.createCriteria().andIdGreaterThan(4);
+            int rows = dao.updateByExampleSelective(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<PkblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(6, returnedRecord.getId().intValue());
+            assertTrue(blobsAreEqual(newRecord.getBlob1(), returnedRecord.getBlob1()));
+            assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKBlobsUpdateByExampleWithoutBLOBs() {
+        PkblobsDAO dao = getPkblobsDAO();
+    
+        try {
+            PkblobsWithBLOBs record = new PkblobsWithBLOBs();
+            record.setId(3);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkblobsWithBLOBs();
+            record.setId(6);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            PkblobsKey newRecord = new PkblobsKey();
+            newRecord.setId(8);
+            
+            PkblobsExample example = new PkblobsExample();
+            example.createCriteria().andIdGreaterThan(4);
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<PkblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(8, returnedRecord.getId().intValue());
+            assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
+            assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKBlobsUpdateByExampleWithBLOBs() {
+        PkblobsDAO dao = getPkblobsDAO();
+    
+        try {
+            PkblobsWithBLOBs record = new PkblobsWithBLOBs();
+            record.setId(3);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkblobsWithBLOBs();
+            record.setId(6);
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            PkblobsWithBLOBs newRecord = new PkblobsWithBLOBs();
+            newRecord.setId(8);
+            
+            PkblobsExample example = new PkblobsExample();
+            example.createCriteria().andIdGreaterThan(4);
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<PkblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(8, returnedRecord.getId().intValue());
+            assertNull(returnedRecord.getBlob1());
+            assertNull(returnedRecord.getBlob2());
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKFieldsBlobsUpdateByExampleSelective() {
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
+    
+        try {
+            PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
+            record.setId1(3);
+            record.setId2(4);
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkfieldsblobsWithBLOBs();
+            record.setId1(5);
+            record.setId2(6);
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+
+            PkfieldsblobsWithBLOBs newRecord = new PkfieldsblobsWithBLOBs();
+            newRecord.setFirstname("Fred");
+            PkfieldsblobsExample example = new PkfieldsblobsExample();
+            example.createCriteria().andId1NotEqualTo(3);
+            int rows = dao.updateByExampleSelective(newRecord, example);
+            assertEquals(1, rows);
+    
+            List<PkfieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkfieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+            assertEquals(newRecord.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(record.getLastname(), returnedRecord.getLastname());
+            assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
+            
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKFieldsBlobsUpdateByExampleWithoutBLOBs() {
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
+    
+        try {
+            PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
+            record.setId1(3);
+            record.setId2(4);
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkfieldsblobsWithBLOBs();
+            record.setId1(5);
+            record.setId2(6);
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+
+            Pkfieldsblobs newRecord = new Pkfieldsblobs();
+            newRecord.setId1(5);
+            newRecord.setId2(8);
+            newRecord.setFirstname("Fred");
+            PkfieldsblobsExample example = new PkfieldsblobsExample();
+            example.createCriteria().andId1EqualTo(5);
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+    
+            List<PkfieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkfieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getId1(), returnedRecord.getId1());
+            assertEquals(newRecord.getId2(), returnedRecord.getId2());
+            assertEquals(newRecord.getFirstname(), returnedRecord.getFirstname());
+            assertNull(returnedRecord.getLastname());
+            assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
+            
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testPKFieldsBlobsUpdateByExampleWithBLOBs() {
+        PkfieldsblobsDAO dao = getPkfieldsblobsDAO();
+    
+        try {
+            PkfieldsblobsWithBLOBs record = new PkfieldsblobsWithBLOBs();
+            record.setId1(3);
+            record.setId2(4);
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new PkfieldsblobsWithBLOBs();
+            record.setId1(5);
+            record.setId2(6);
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            dao.insert(record);
+
+            PkfieldsblobsWithBLOBs newRecord = new PkfieldsblobsWithBLOBs();
+            newRecord.setId1(3);
+            newRecord.setId2(8);
+            newRecord.setFirstname("Fred");
+            PkfieldsblobsExample example = new PkfieldsblobsExample();
+            example.createCriteria().andId1EqualTo(3);
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+    
+            List<PkfieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            PkfieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getId1(), returnedRecord.getId1());
+            assertEquals(newRecord.getId2(), returnedRecord.getId2());
+            assertEquals(newRecord.getFirstname(), returnedRecord.getFirstname());
+            assertNull(returnedRecord.getLastname());
+            assertNull(returnedRecord.getBlob1());
+            
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testFieldsBlobsUpdateByExampleSelective() {
+        FieldsblobsDAO dao = getFieldsblobsDAO();
+    
+        try {
+            FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+
+            FieldsblobsWithBLOBs newRecord = new FieldsblobsWithBLOBs();
+            newRecord.setLastname("Doe");
+            FieldsblobsExample example = new FieldsblobsExample();
+            example.createCriteria().andFirstnameLike("S%");
+            int rows = dao.updateByExampleSelective(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<FieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            FieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(record.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
+            assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
+            assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testFieldsBlobsUpdateByExampleWithoutBLOBs() {
+        FieldsblobsDAO dao = getFieldsblobsDAO();
+    
+        try {
+            FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+
+            Fieldsblobs newRecord = new Fieldsblobs();
+            newRecord.setFirstname("Scott");
+            newRecord.setLastname("Doe");
+            FieldsblobsExample example = new FieldsblobsExample();
+            example.createCriteria().andFirstnameLike("S%");
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<FieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            FieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
+            assertTrue(blobsAreEqual(record.getBlob1(), returnedRecord.getBlob1()));
+            assertTrue(blobsAreEqual(record.getBlob2(), returnedRecord.getBlob2()));
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testFieldsBlobsUpdateByExampleWithBLOBs() {
+        FieldsblobsDAO dao = getFieldsblobsDAO();
+    
+        try {
+            FieldsblobsWithBLOBs record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Jeff");
+            record.setLastname("Smith");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+    
+            record = new FieldsblobsWithBLOBs();
+            record.setFirstname("Scott");
+            record.setLastname("Jones");
+            record.setBlob1(generateRandomBlob());
+            record.setBlob2(generateRandomBlob());
+            dao.insert(record);
+
+            FieldsblobsWithBLOBs newRecord = new FieldsblobsWithBLOBs();
+            newRecord.setFirstname("Scott");
+            newRecord.setLastname("Doe");
+            FieldsblobsExample example = new FieldsblobsExample();
+            example.createCriteria().andFirstnameLike("S%");
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+            
+            List<FieldsblobsWithBLOBs> answer = dao.selectByExampleWithBLOBs(example);
+            assertEquals(1, answer.size());
+            
+            FieldsblobsWithBLOBs returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
+            assertNull(returnedRecord.getBlob1());
+            assertNull(returnedRecord.getBlob2());
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testAwfulTableUpdateByExampleSelective() {
+        AwfulTableDAO dao = getAwfulTableDAO();
+    
+        try {
+            AwfulTable record = new AwfulTable();
+            record.seteMail("fred@fred.com");
+            record.setEmailaddress("alsofred@fred.com");
+            record.setFirstFirstName("fred1");
+            record.setFourthFirstName("fred4");
+            record.setFrom("from field");
+            record.setId1(1);
+            record.setId2(2);
+            record.setId5(5);
+            record.setId6(6);
+            record.setId7(7);
+            record.setSecondCustomerId(567);
+            record.setSecondFirstName("fred2");
+            record.setThirdFirstName("fred3");
+    
+            dao.insert(record);
+    
+            record = new AwfulTable();
+            record.seteMail("fred2@fred.com");
+            record.setEmailaddress("alsofred2@fred.com");
+            record.setFirstFirstName("fred11");
+            record.setFourthFirstName("fred44");
+            record.setFrom("from from field");
+            record.setId1(11);
+            record.setId2(22);
+            record.setId5(55);
+            record.setId6(66);
+            record.setId7(77);
+            record.setSecondCustomerId(567567);
+            record.setSecondFirstName("fred22");
+            record.setThirdFirstName("fred33");
+    
+            dao.insert(record);
+    
+            AwfulTable newRecord = new AwfulTable();
+            newRecord.setFirstFirstName("Alonzo");
+            AwfulTableExample example = new AwfulTableExample();
+            example.createCriteria().andEMailLike("fred2@%");
+            int rows = dao.updateByExampleSelective(newRecord, example);
+            assertEquals(1, rows);
+    
+            List<AwfulTable> answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+
+            AwfulTable returnedRecord = answer.get(0);
+            
+            assertEquals(record.getCustomerId(), returnedRecord.getCustomerId());
+            assertEquals(record.geteMail(), returnedRecord.geteMail());
+            assertEquals(record.getEmailaddress(), returnedRecord.getEmailaddress());
+            assertEquals(newRecord.getFirstFirstName(), returnedRecord.getFirstFirstName());
+            assertEquals(record.getFourthFirstName(), returnedRecord.getFourthFirstName());
+            assertEquals(record.getFrom(), returnedRecord.getFrom());
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+            assertEquals(record.getId5(), returnedRecord.getId5());
+            assertEquals(record.getId6(), returnedRecord.getId6());
+            assertEquals(record.getId7(), returnedRecord.getId7());
+            assertEquals(record.getSecondCustomerId(), returnedRecord.getSecondCustomerId());
+            assertEquals(record.getSecondFirstName(), returnedRecord.getSecondFirstName());
+            assertEquals(record.getThirdFirstName(), returnedRecord.getThirdFirstName());
+            
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testAwfulTableUpdateByExample() {
+        AwfulTableDAO dao = getAwfulTableDAO();
+    
+        try {
+            AwfulTable record = new AwfulTable();
+            record.seteMail("fred@fred.com");
+            record.setEmailaddress("alsofred@fred.com");
+            record.setFirstFirstName("fred1");
+            record.setFourthFirstName("fred4");
+            record.setFrom("from field");
+            record.setId1(1);
+            record.setId2(2);
+            record.setId5(5);
+            record.setId6(6);
+            record.setId7(7);
+            record.setSecondCustomerId(567);
+            record.setSecondFirstName("fred2");
+            record.setThirdFirstName("fred3");
+    
+            dao.insert(record);
+    
+            record = new AwfulTable();
+            record.seteMail("fred2@fred.com");
+            record.setEmailaddress("alsofred2@fred.com");
+            record.setFirstFirstName("fred11");
+            record.setFourthFirstName("fred44");
+            record.setFrom("from from field");
+            record.setId1(11);
+            record.setId2(22);
+            record.setId5(55);
+            record.setId6(66);
+            record.setId7(77);
+            record.setSecondCustomerId(567567);
+            record.setSecondFirstName("fred22");
+            record.setThirdFirstName("fred33");
+    
+            dao.insert(record);
+    
+            AwfulTable newRecord = new AwfulTable();
+            newRecord.setFirstFirstName("Alonzo");
+            newRecord.setCustomerId(58);
+            newRecord.setId1(111);
+            newRecord.setId2(222);
+            newRecord.setId5(555);
+            newRecord.setId6(666);
+            newRecord.setId7(777);
+            AwfulTableExample example = new AwfulTableExample();
+            example.createCriteria().andEMailLike("fred2@%");
+            int rows = dao.updateByExample(newRecord, example);
+            assertEquals(1, rows);
+
+            example.clear();
+            example.createCriteria().andCustomerIdEqualTo(58);
+            List<AwfulTable> answer = dao.selectByExample(example);
+            assertEquals(1, answer.size());
+
+            AwfulTable returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getCustomerId(), returnedRecord.getCustomerId());
+            assertNull(returnedRecord.geteMail());
+            assertNull(returnedRecord.getEmailaddress());
+            assertEquals(newRecord.getFirstFirstName(), returnedRecord.getFirstFirstName());
+            assertNull(returnedRecord.getFourthFirstName());
+            assertNull(returnedRecord.getFrom());
+            assertEquals(newRecord.getId1(), returnedRecord.getId1());
+            assertEquals(newRecord.getId2(), returnedRecord.getId2());
+            assertEquals(newRecord.getId5(), returnedRecord.getId5());
+            assertEquals(newRecord.getId6(), returnedRecord.getId6());
+            assertEquals(newRecord.getId7(), returnedRecord.getId7());
+            assertNull(returnedRecord.getSecondCustomerId());
+            assertNull(returnedRecord.getSecondFirstName());
+            assertNull(returnedRecord.getThirdFirstName());
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+}

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/AbstractMiscellaneousTest.java
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/AbstractMiscellaneousTest.java?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/AbstractMiscellaneousTest.java (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/AbstractMiscellaneousTest.java Sat Nov  7 22:59:00 2009
@@ -0,0 +1,26 @@
+package ibatortest.execute.miscellaneous;
+
+import ibatortest.AbstractTest;
+import ibatortest.generated.miscellaneous.dao.MyObjectDAO;
+import ibatortest.generated.miscellaneous.dao.RegexrenameDAO;
+import ibatortest.generated.miscellaneous.dao.impl.MyObjectDAOImpl;
+import ibatortest.generated.miscellaneous.dao.impl.RegexrenameDAOImpl;
+
+public abstract class AbstractMiscellaneousTest extends AbstractTest {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        initSqlMapClient("ibatortest/execute/miscellaneous/SqlMapConfig.xml",
+                null);
+    }
+    
+    protected MyObjectDAO getMyObjectDAO() {
+        MyObjectDAOImpl dao = new MyObjectDAOImpl(getSqlMapClient());
+        return dao;
+    }
+    
+    protected RegexrenameDAO getRegexrenameDAO() {
+        RegexrenameDAOImpl dao = new RegexrenameDAOImpl(getSqlMapClient());
+        return dao;
+    }
+}

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/MiscellaneousTest.java
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/MiscellaneousTest.java?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/MiscellaneousTest.java (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/MiscellaneousTest.java Sat Nov  7 22:59:00 2009
@@ -0,0 +1,1008 @@
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package ibatortest.execute.miscellaneous;
+
+/*
+ *  Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+import ibatortest.generated.miscellaneous.dao.MyObjectDAO;
+import ibatortest.generated.miscellaneous.dao.RegexrenameDAO;
+import ibatortest.generated.miscellaneous.model.Anotherawfultable;
+import ibatortest.generated.miscellaneous.model.MyObject;
+import ibatortest.generated.miscellaneous.model.MyObjectCriteria;
+import ibatortest.generated.miscellaneous.model.MyObjectKey;
+import ibatortest.generated.miscellaneous.model.Regexrename;
+
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import com.ibatis.sqlmap.client.SqlMapClient;
+
+/**
+ * @author Jeff Butler
+ * 
+ */
+public class MiscellaneousTest extends AbstractMiscellaneousTest {
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        initSqlMapClient("ibatortest/execute/miscellaneous/SqlMapConfig.xml",
+                null);
+    }
+
+    public void testMyObjectinsertMyObject() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            record.setStartDate(new Date());
+            record.setDecimal100field(10L);
+            record.setDecimal155field(15.12345);
+            record.setDecimal60field(6);
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setId1(1);
+            record.setId2(2);
+            record.setLastname("Butler");
+
+            MyTime myTime = new MyTime();
+            myTime.setHours(12);
+            myTime.setMinutes(34);
+            myTime.setSeconds(05);
+            record.setTimefield(myTime);
+            record.setTimestampfield(new Date());
+
+            dao.insertMyObject(record);
+
+            MyObjectKey key = new MyObjectKey();
+            key.setId1(1);
+            key.setId2(2);
+
+            MyObject returnedRecord = dao.selectMyObjectByPrimaryKey(key);
+            assertNotNull(returnedRecord);
+
+            assertTrue(datesAreEqual(record.getStartDate(), returnedRecord
+                    .getStartDate()));
+            assertEquals(record.getDecimal100field(), returnedRecord
+                    .getDecimal100field());
+            assertEquals(record.getDecimal155field(), returnedRecord
+                    .getDecimal155field());
+            assertEquals(record.getDecimal60field(), returnedRecord
+                    .getDecimal60field());
+            assertEquals(record.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+            assertEquals(record.getLastname(), returnedRecord.getLastname());
+            assertEquals(record.getTimefield(), returnedRecord.getTimefield());
+            assertEquals(record.getTimestampfield(), returnedRecord
+                    .getTimestampfield());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectUpdateByPrimaryKey() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+
+            dao.insertMyObject(record);
+
+            fn = new FirstName();
+            fn.setValue("Scott");
+            record.setFirstname(fn);
+            record.setLastname("Jones");
+
+            int rows = dao.updateMyObjectByPrimaryKey(record);
+            assertEquals(1, rows);
+
+            MyObjectKey key = new MyObjectKey();
+            key.setId1(1);
+            key.setId2(2);
+
+            MyObject record2 = dao.selectMyObjectByPrimaryKey(key);
+
+            assertEquals(record.getFirstname(), record2.getFirstname());
+            assertEquals(record.getLastname(), record2.getLastname());
+            assertEquals(record.getId1(), record2.getId1());
+            assertEquals(record.getId2(), record2.getId2());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectUpdateByPrimaryKeySelective() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setDecimal60field(5);
+            record.setId1(1);
+            record.setId2(2);
+
+            dao.insertMyObject(record);
+
+            MyObject newRecord = new MyObject();
+            newRecord.setId1(1);
+            newRecord.setId2(2);
+            fn = new FirstName();
+            fn.setValue("Scott");
+            newRecord.setFirstname(fn);
+            record.setStartDate(new Date());
+
+            int rows = dao.updateMyObjectByPrimaryKeySelective(newRecord);
+            assertEquals(1, rows);
+
+            MyObjectKey key = new MyObjectKey();
+            key.setId1(1);
+            key.setId2(2);
+
+            MyObject returnedRecord = dao.selectMyObjectByPrimaryKey(key);
+
+            assertTrue(datesAreEqual(newRecord.getStartDate(), returnedRecord
+                    .getStartDate()));
+            assertEquals(record.getDecimal100field(), returnedRecord
+                    .getDecimal100field());
+            assertEquals(record.getDecimal155field(), returnedRecord
+                    .getDecimal155field());
+
+            // with columns mapped to primitive types, the column is always
+            // updated
+            assertEquals(newRecord.getDecimal60field(), returnedRecord
+                    .getDecimal60field());
+
+            assertEquals(newRecord.getFirstname(), returnedRecord
+                    .getFirstname());
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+            assertEquals(record.getLastname(), returnedRecord.getLastname());
+            assertEquals(record.getTimefield(), returnedRecord.getTimefield());
+            assertEquals(record.getTimestampfield(), returnedRecord
+                    .getTimestampfield());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectDeleteByPrimaryKey() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+
+            dao.insertMyObject(record);
+
+            MyObjectKey key = new MyObjectKey();
+            key.setId1(1);
+            key.setId2(2);
+
+            int rows = dao.deleteMyObjectByPrimaryKey(key);
+            assertEquals(1, rows);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(0, answer.size());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectDeleteByExample() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bob");
+            record.setFirstname(fn);
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(2, answer.size());
+
+            example = new MyObjectCriteria();
+            example.createCriteria().andLastnameLike("J%");
+            int rows = dao.deleteMyObjectByExample(example);
+            assertEquals(1, rows);
+
+            example = new MyObjectCriteria();
+            answer = dao.selectMyObjectByExample(example);
+            assertEquals(1, answer.size());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectSelectByPrimaryKey() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bob");
+            record.setFirstname(fn);
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+            dao.insertMyObject(record);
+
+            MyObjectKey key = new MyObjectKey();
+            key.setId1(3);
+            key.setId2(4);
+            MyObject newRecord = dao.selectMyObjectByPrimaryKey(key);
+
+            assertNotNull(newRecord);
+            assertEquals(record.getFirstname(), newRecord.getFirstname());
+            assertEquals(record.getLastname(), newRecord.getLastname());
+            assertEquals(record.getId1(), newRecord.getId1());
+            assertEquals(record.getId2(), newRecord.getId2());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectSelectByExampleLike() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            fn = new FirstName();
+            fn.setValue("B%");
+            example.createCriteria().andFirstnameLike(fn);
+            example.setOrderByClause("ID1, ID2");
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(3, answer.size());
+            MyObject returnedRecord = (MyObject) answer.get(0);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(1, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(1);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(2, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(2);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectSelectByExampleNotLike() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            fn = new FirstName();
+            fn.setValue("B%");
+            example.createCriteria().andFirstnameNotLike(fn);
+            example.setOrderByClause("ID1, ID2");
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(3, answer.size());
+            MyObject returnedRecord = (MyObject) answer.get(0);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(1, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(1);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(2, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(2);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectSelectByExampleComplexLike() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            fn = new FirstName();
+            fn.setValue("B%");
+            example.createCriteria().andFirstnameLike(fn).andId2EqualTo(3);
+            fn = new FirstName();
+            fn.setValue("W%");
+            example.or(example.createCriteria().andFirstnameLike(fn));
+
+            example.setOrderByClause("ID1, ID2");
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(2, answer.size());
+            MyObject returnedRecord = (MyObject) answer.get(0);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(2, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(1);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectSelectByExampleIn() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            List<Integer> ids = new ArrayList<Integer>();
+            ids.add(1);
+            ids.add(3);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            example.createCriteria().andId2In(ids);
+
+            example.setOrderByClause("ID1, ID2");
+            List<MyObject> answer = dao.selectMyObjectByExample(example);
+            assertEquals(4, answer.size());
+            MyObject returnedRecord = answer.get(0);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(1, returnedRecord.getId2().intValue());
+            assertEquals("Flintstone", returnedRecord.getLastname());
+            
+            returnedRecord = answer.get(1);
+            assertEquals(1, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+            assertEquals("Flintstone", returnedRecord.getLastname());
+            
+            returnedRecord = answer.get(2);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(1, returnedRecord.getId2().intValue());
+            assertEquals("Rubble", returnedRecord.getLastname());
+            
+            returnedRecord = answer.get(3);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+            assertEquals("Rubble", returnedRecord.getLastname());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectSelectByExampleBetween() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            example.createCriteria().andId2Between(1, 3);
+
+            example.setOrderByClause("ID1, ID2");
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(6, answer.size());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectSelectByExampleTimeEquals() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            record.setStartDate(new Date());
+            record.setDecimal100field(10L);
+            record.setDecimal155field(15.12345);
+            record.setDecimal60field(6);
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setId1(1);
+            record.setId2(2);
+            record.setLastname("Butler");
+
+            MyTime myTime = new MyTime();
+            myTime.setHours(12);
+            myTime.setMinutes(34);
+            myTime.setSeconds(05);
+            record.setTimefield(myTime);
+            record.setTimestampfield(new Date());
+
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            example.createCriteria().andTimefieldEqualTo(myTime);
+            List<MyObject> results = dao.selectMyObjectByExample(example);
+            assertEquals(1, results.size());
+            MyObject returnedRecord = results.get(0);
+
+            assertTrue(datesAreEqual(record.getStartDate(), returnedRecord
+                    .getStartDate()));
+            assertEquals(record.getDecimal100field(), returnedRecord
+                    .getDecimal100field());
+            assertEquals(record.getDecimal155field(), returnedRecord
+                    .getDecimal155field());
+            assertEquals(record.getDecimal60field(), returnedRecord
+                    .getDecimal60field());
+            assertEquals(record.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+            assertEquals(record.getLastname(), returnedRecord.getLastname());
+            assertEquals(record.getTimefield(), returnedRecord.getTimefield());
+            assertEquals(record.getTimestampfield(), returnedRecord
+                    .getTimestampfield());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testFieldIgnored() {
+        try {
+            MyObject.class.getDeclaredField("decimal30field");
+            fail("decimal30field should be ignored");
+        } catch (NoSuchFieldException e) {
+            // ignore (normal case)
+        }
+    }
+
+    public void testMyObjectUpdateByExampleSelective() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bob");
+            record.setFirstname(fn);
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+
+            dao.insertMyObject(record);
+
+            MyObject newRecord = new MyObject();
+            newRecord.setLastname("Barker");
+            
+            MyObjectCriteria example = new MyObjectCriteria();
+            fn = new FirstName();
+            fn.setValue("B%");
+            example.createCriteria().andFirstnameLike(fn);
+            int rows = dao.updateMyObjectByExampleSelective(newRecord, example);
+            assertEquals(1, rows);
+
+            List<MyObject> answer = dao.selectMyObjectByExample(example);
+            assertEquals(1, answer.size());
+            
+            MyObject returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
+            assertEquals(record.getFirstname(), returnedRecord.getFirstname());
+            assertEquals(record.getId1(), returnedRecord.getId1());
+            assertEquals(record.getId2(), returnedRecord.getId2());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    public void testMyObjectUpdateByExample() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Jeff");
+            record.setFirstname(fn);
+            record.setLastname("Smith");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bob");
+            record.setFirstname(fn);
+            record.setLastname("Jones");
+            record.setId1(3);
+            record.setId2(4);
+
+            dao.insertMyObject(record);
+
+            MyObject newRecord = new MyObject();
+            newRecord.setLastname("Barker");
+            newRecord.setId1(3);
+            newRecord.setId2(4);
+            
+            MyObjectCriteria example = new MyObjectCriteria();
+            example.createCriteria()
+                .andId1EqualTo(3)
+                .andId2EqualTo(4);
+            int rows = dao.updateMyObjectByExample(newRecord, example);
+            assertEquals(1, rows);
+
+            List<MyObject> answer = dao.selectMyObjectByExample(example);
+            assertEquals(1, answer.size());
+            
+            MyObject returnedRecord = answer.get(0);
+            
+            assertEquals(newRecord.getLastname(), returnedRecord.getLastname());
+            assertNull(returnedRecord.getFirstname());
+            assertEquals(newRecord.getId1(), returnedRecord.getId1());
+            assertEquals(newRecord.getId2(), returnedRecord.getId2());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+    
+    public void testRegexRenameInsert() {
+        RegexrenameDAO dao = getRegexrenameDAO();
+        
+        try {
+            Regexrename record = new Regexrename();
+            record.setAddress("123 Main Street");
+            record.setId(22);
+            record.setName("Fred");
+            record.setZipCode("99999");
+            
+            dao.insertRegexrename(record);
+            
+            Regexrename returnedRecord = dao.selectRegexrenameByPrimaryKey(22);
+            
+            assertEquals(record.getAddress(), returnedRecord.getAddress());
+            assertEquals(record.getId(), returnedRecord.getId());
+            assertEquals(record.getName(), returnedRecord.getName());
+            assertEquals(record.getZipCode(), returnedRecord.getZipCode());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+    
+    public void testAnotherAwfulTableInsert() {
+        SqlMapClient sqlMap = getSqlMapClient();
+        
+        try {
+            Anotherawfultable record = new Anotherawfultable();
+            record.setId(5);
+            record.setSelect("select");
+            record.setInsert("insert");
+            
+            sqlMap.insert("ANOTHERAWFULTABLE.insert", record);
+            
+            Anotherawfultable key = new Anotherawfultable();
+            key.setId(5);
+            
+            Anotherawfultable returnedRecord = (Anotherawfultable)
+                sqlMap.queryForObject("ANOTHERAWFULTABLE.selectByPrimaryKey",
+                        key);
+            
+            assertEquals(record.getId(), returnedRecord.getId());
+            assertEquals(record.getSelect(), returnedRecord.getSelect());
+            assertEquals(record.getInsert(), returnedRecord.getInsert());
+            assertEquals(record.getUpdate(), returnedRecord.getUpdate());
+            assertEquals(record.getDelete(), returnedRecord.getDelete());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public void testMyObjectSelectByExampleLikeInsensitive() {
+        MyObjectDAO dao = getMyObjectDAO();
+
+        try {
+            MyObject record = new MyObject();
+            FirstName fn = new FirstName();
+            fn.setValue("Fred");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Wilma");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Pebbles");
+            record.setFirstname(fn);
+            record.setLastname("Flintstone");
+            record.setId1(1);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Barney");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(1);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Betty");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(2);
+            dao.insertMyObject(record);
+
+            record = new MyObject();
+            fn = new FirstName();
+            fn.setValue("Bamm Bamm");
+            record.setFirstname(fn);
+            record.setLastname("Rubble");
+            record.setId1(2);
+            record.setId2(3);
+            dao.insertMyObject(record);
+
+            MyObjectCriteria example = new MyObjectCriteria();
+            example.createCriteria().andLastnameLike("RU%");
+            example.setOrderByClause("ID1, ID2");
+            List answer = dao.selectMyObjectByExample(example);
+            assertEquals(0, answer.size());
+            
+            example.clear();
+            example.createCriteria().andLastnameLikeInsensitive("RU%");
+            answer = dao.selectMyObjectByExample(example);
+            assertEquals(3, answer.size());
+            
+            MyObject returnedRecord = (MyObject) answer.get(0);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(1, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(1);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(2, returnedRecord.getId2().intValue());
+            returnedRecord = (MyObject) answer.get(2);
+            assertEquals(2, returnedRecord.getId1().intValue());
+            assertEquals(3, returnedRecord.getId2().intValue());
+        } catch (SQLException e) {
+            fail(e.getMessage());
+        }
+    }
+}

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/SqlMapConfig.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/SqlMapConfig.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/java/ibatortest/execute/miscellaneous/SqlMapConfig.xml Sat Nov  7 22:59:00 2009
@@ -0,0 +1,24 @@
+<?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" />
+
+  <transactionManager type="JDBC">
+    <dataSource type="SIMPLE">
+      <property name="JDBC.Driver" value="org.hsqldb.jdbcDriver"/>
+      <property name="JDBC.ConnectionURL" value="jdbc:hsqldb:mem:aname"/>
+      <property name="JDBC.Username" value="sa"/>
+      <property name="JDBC.Password" value=""/>
+      <property name="JDBC.DefaultAutoCommit" value="true"/>
+    </dataSource>
+  </transactionManager>
+
+  <sqlMap resource="ibatortest/generated/miscellaneous/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/miscellaneous/xml/REGEXRENAME_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/miscellaneous/xml/ANOTHERAWFULTABLE_SqlMap.xml" />
+
+</sqlMapConfig>

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SpringBeans.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SpringBeans.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SpringBeans.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SpringBeans.xml Sat Nov  7 22:59:00 2009
@@ -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.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/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SqlMapConfig.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SqlMapConfig.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java2/SqlMapConfig.xml Sat Nov  7 22:59:00 2009
@@ -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>

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java5/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java5/SqlMapConfig.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java5/SqlMapConfig.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/conditional/java5/SqlMapConfig.xml Sat Nov  7 22:59:00 2009
@@ -0,0 +1,28 @@
+<?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" />
+
+  <transactionManager type="JDBC">
+    <dataSource type="SIMPLE">
+      <property name="JDBC.Driver" value="org.hsqldb.jdbcDriver"/>
+      <property name="JDBC.ConnectionURL" value="jdbc:hsqldb:mem:aname"/>
+      <property name="JDBC.Username" value="sa"/>
+      <property name="JDBC.Password" value=""/>
+      <property name="JDBC.DefaultAutoCommit" value="true"/>
+    </dataSource>
+  </transactionManager>
+
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/FIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/FIELDSONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/PKBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/PKFIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/PKONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/conditional/java5/xml/awful table_SqlMap.xml" />
+
+</sqlMapConfig>

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java2/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java2/SqlMapConfig.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java2/SqlMapConfig.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java2/SqlMapConfig.xml Sat Nov  7 22:59:00 2009
@@ -0,0 +1,28 @@
+<?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" />
+
+  <transactionManager type="JDBC">
+    <dataSource type="SIMPLE">
+      <property name="JDBC.Driver" value="org.hsqldb.jdbcDriver"/>
+      <property name="JDBC.ConnectionURL" value="jdbc:hsqldb:mem:aname"/>
+      <property name="JDBC.Username" value="sa"/>
+      <property name="JDBC.Password" value=""/>
+      <property name="JDBC.DefaultAutoCommit" value="true"/>
+    </dataSource>
+  </transactionManager>
+
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/FIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/FIELDSONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/PKBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/PKFIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/PKONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java2/xml/awful table_SqlMap.xml" />
+
+</sqlMapConfig>

Added: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java5/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java5/SqlMapConfig.xml?rev=833772&view=auto
==============================================================================
--- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java5/SqlMapConfig.xml (added)
+++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/src/test/resources/ibatortest/execute/flat/java5/SqlMapConfig.xml Sat Nov  7 22:59:00 2009
@@ -0,0 +1,28 @@
+<?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" />
+
+  <transactionManager type="JDBC">
+    <dataSource type="SIMPLE">
+      <property name="JDBC.Driver" value="org.hsqldb.jdbcDriver"/>
+      <property name="JDBC.ConnectionURL" value="jdbc:hsqldb:mem:aname"/>
+      <property name="JDBC.Username" value="sa"/>
+      <property name="JDBC.Password" value=""/>
+      <property name="JDBC.DefaultAutoCommit" value="true"/>
+    </dataSource>
+  </transactionManager>
+
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/FIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/FIELDSONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/PKBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/PKFIELDS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/PKFIELDSBLOBS_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/PKONLY_SqlMap.xml" />
+  <sqlMap resource="ibatortest/generated/flat/java5/xml/awful table_SqlMap.xml" />
+
+</sqlMapConfig>



Mime
View raw message