db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1206426 [7/7] - in /db/torque/torque4/trunk: torque-runtime/src/main/java/org/apache/torque/ torque-runtime/src/main/java/org/apache/torque/avalon/ torque-runtime/src/main/java/org/apache/torque/dsfactory/ torque-runtime/src/main/java/org/...
Date Sat, 26 Nov 2011 10:59:52 GMT
Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/ForeignKeySchemaData.java Sat Nov 26 10:59:15 2011
@@ -22,12 +22,12 @@ package org.apache.torque;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.torque.test.CompositeIntegerVarcharFk;
-import org.apache.torque.test.CompositeIntegerVarcharFkPeer;
-import org.apache.torque.test.CompositeIntegerVarcharPk;
-import org.apache.torque.test.CompositeIntegerVarcharPkPeer;
-import org.apache.torque.test.CompositeNonpkFk;
-import org.apache.torque.test.CompositeNonpkFkPeer;
+import org.apache.torque.test.CompIntegerVarcharFk;
+import org.apache.torque.test.CompIntegerVarcharFkPeer;
+import org.apache.torque.test.CompIntegerVarcharPk;
+import org.apache.torque.test.CompIntegerVarcharPkPeer;
+import org.apache.torque.test.CompNonpkFk;
+import org.apache.torque.test.CompNonpkFkPeer;
 import org.apache.torque.test.NonPkOIntegerFk;
 import org.apache.torque.test.NonPkOIntegerFkPeer;
 import org.apache.torque.test.NonPkPIntegerFk;
@@ -77,23 +77,23 @@ public class ForeignKeySchemaData
     private List<NonPkOIntegerFk> nonPkOIntegerFkList
         = new ArrayList<NonPkOIntegerFk>();
 
-    private List<CompositeIntegerVarcharPk> compositeIntegerVarcharPkList
-        = new ArrayList<CompositeIntegerVarcharPk>();
+    private List<CompIntegerVarcharPk> compositeIntegerVarcharPkList
+        = new ArrayList<CompIntegerVarcharPk>();
 
-    private List<CompositeIntegerVarcharFk> compositeIntegerVarcharFkList
-    = new ArrayList<CompositeIntegerVarcharFk>();
+    private List<CompIntegerVarcharFk> compositeIntegerVarcharFkList
+    = new ArrayList<CompIntegerVarcharFk>();
 
-    private List<CompositeNonpkFk> compositeNonpkFkList
-        = new ArrayList<CompositeNonpkFk>();
+    private List<CompNonpkFk> compositeNonpkFkList
+        = new ArrayList<CompNonpkFk>();
 
     /**
      * Creates the default Test data for the foreign key schema.
      * The test data is filled as follows (p=primitive, o=object):
-     * 
+     *
      * pIntegerPk1
      *     - nonPkPIntegerFk1a
      *     - nonPkPIntegerFk1b
-     *     
+     *
      * pIntegerPk2
      *     - nonPkPIntegerFk2
      *     - nullablePIntegerFk2
@@ -104,11 +104,11 @@ public class ForeignKeySchemaData
      *     - nullablePIntegerFk3b
      *     - requiredPIntegerFk3a
      *     - requiredPIntegerFk3b
-     * 
+     *
      * oIntegerPk1
      *     - nonPkOIntegerFk1a
      *     - nonPkOIntegerFk1b
-     *     
+     *
      * oIntegerPk2
      *     - nullableOIntegerFk2
      *     - requiredOIntegerFk2
@@ -134,7 +134,7 @@ public class ForeignKeySchemaData
      * compositeIntegerVarcharPk3
      *     - compositeIntegerVarcharPk3a
      *     - compositeIntegerVarcharPk3b
-     * 
+     *
      * @return a new instance filled with the default test data.
      *
      * @throws TorqueException should not occur.
@@ -221,7 +221,7 @@ public class ForeignKeySchemaData
                 requiredPIntegerFk2);
         result.getRequiredPIntegerFkList().add(
                 requiredPIntegerFk2);
-        
+
         RequiredPIntegerFk requiredPIntegerFk3a
                 = new RequiredPIntegerFk();
         requiredPIntegerFk3a.setName(
@@ -230,7 +230,7 @@ public class ForeignKeySchemaData
                 requiredPIntegerFk3a);
         result.getRequiredPIntegerFkList().add(
                 requiredPIntegerFk3a);
-        
+
         RequiredPIntegerFk requiredPIntegerFk3b
                 = new RequiredPIntegerFk();
         requiredPIntegerFk3b.setName(
@@ -252,7 +252,7 @@ public class ForeignKeySchemaData
                 nonPkPIntegerFk1a);
         result.getNonPkPIntegerFkList().add(
                 nonPkPIntegerFk1a);
-        
+
         NonPkPIntegerFk nonPkPIntegerFk1b
                 = new NonPkPIntegerFk();
         nonPkPIntegerFk1b.setName(
@@ -301,7 +301,7 @@ public class ForeignKeySchemaData
                 nullableOIntegerFk2);
         result.getNullableOIntegerFkList().add(
                 nullableOIntegerFk2);
-        
+
         NullableOIntegerFk nullableOIntegerFk3a
                 = new NullableOIntegerFk();
         nullableOIntegerFk3a.setName(
@@ -310,7 +310,7 @@ public class ForeignKeySchemaData
                 nullableOIntegerFk3a);
         result.getNullableOIntegerFkList().add(
                 nullableOIntegerFk3a);
-        
+
         NullableOIntegerFk nullableOIntegerFk3b
                 = new NullableOIntegerFk();
         nullableOIntegerFk3b.setName(
@@ -319,7 +319,7 @@ public class ForeignKeySchemaData
                 nullableOIntegerFk3b);
         result.getNullableOIntegerFkList().add(
                 nullableOIntegerFk3b);
-        
+
         NullableOIntegerFk nullableOIntegerFk4
                 = new NullableOIntegerFk();
         nullableOIntegerFk4.setName(
@@ -339,7 +339,7 @@ public class ForeignKeySchemaData
                 requiredOIntegerFk2);
         result.getRequiredOIntegerFkList().add(
                 requiredOIntegerFk2);
-        
+
         RequiredOIntegerFk requiredOIntegerFk3a
                 = new RequiredOIntegerFk();
         requiredOIntegerFk3a.setName(
@@ -348,7 +348,7 @@ public class ForeignKeySchemaData
                 requiredOIntegerFk3a);
         result.getRequiredOIntegerFkList().add(
                 requiredOIntegerFk3a);
-        
+
         RequiredOIntegerFk requiredOIntegerFk3b
                 = new RequiredOIntegerFk();
         requiredOIntegerFk3b.setName(
@@ -370,7 +370,7 @@ public class ForeignKeySchemaData
                 nonPkOIntegerFk1a);
         result.getNonPkOIntegerFkList().add(
                 nonPkOIntegerFk1a);
-        
+
         NonPkOIntegerFk nonPkOIntegerFk1b
                 = new NonPkOIntegerFk();
         nonPkOIntegerFk1b.setName(
@@ -379,7 +379,7 @@ public class ForeignKeySchemaData
                 nonPkOIntegerFk1b);
         result.getNonPkOIntegerFkList().add(
                 nonPkOIntegerFk1b);
-        
+
         NonPkOIntegerFk nonPkOIntegerFk2
                 = new NonPkOIntegerFk();
         nonPkOIntegerFk2.setName(
@@ -393,8 +393,8 @@ public class ForeignKeySchemaData
     private static void fillCompositeIntegerVarcharPks(
             ForeignKeySchemaData result)
     {
-        CompositeIntegerVarcharPk compositeIntegerVarcharPk1
-                = new CompositeIntegerVarcharPk();
+        CompIntegerVarcharPk compositeIntegerVarcharPk1
+                = new CompIntegerVarcharPk();
         compositeIntegerVarcharPk1.setName("compositeIntegerVarcharPk1");
         compositeIntegerVarcharPk1.setId1(10);
         compositeIntegerVarcharPk1.setId2("x");
@@ -403,8 +403,8 @@ public class ForeignKeySchemaData
         result.getCompositeIntegerVarcharPkList().add(
                 compositeIntegerVarcharPk1);
 
-        CompositeIntegerVarcharPk compositeIntegerVarcharPk2
-                = new CompositeIntegerVarcharPk();
+        CompIntegerVarcharPk compositeIntegerVarcharPk2
+                = new CompIntegerVarcharPk();
         compositeIntegerVarcharPk2.setName("compositeIntegerVarcharPk2");
         compositeIntegerVarcharPk2.setId1(10);
         compositeIntegerVarcharPk2.setId2("y");
@@ -413,8 +413,8 @@ public class ForeignKeySchemaData
         result.getCompositeIntegerVarcharPkList().add(
                 compositeIntegerVarcharPk2);
 
-        CompositeIntegerVarcharPk compositeIntegerVarcharPk3
-                = new CompositeIntegerVarcharPk();
+        CompIntegerVarcharPk compositeIntegerVarcharPk3
+                = new CompIntegerVarcharPk();
         compositeIntegerVarcharPk3.setName("compositeIntegerVarcharPk3");
         compositeIntegerVarcharPk3.setId1(11);
         compositeIntegerVarcharPk3.setId2("x");
@@ -428,32 +428,32 @@ public class ForeignKeySchemaData
                 ForeignKeySchemaData result)
             throws TorqueException
     {
-        CompositeIntegerVarcharFk compositeIntegerVarcharFk2
-                = new CompositeIntegerVarcharFk();
+        CompIntegerVarcharFk compositeIntegerVarcharFk2
+                = new CompIntegerVarcharFk();
         compositeIntegerVarcharFk2.setName(
                 "compositeIntegerVarcharFk2");
         result.getCompositeIntegerVarcharPkList().get(1)
-                .addCompositeIntegerVarcharFk(
+                .addCompIntegerVarcharFk(
                     compositeIntegerVarcharFk2);
         result.getCompositeIntegerVarcharFkList().add(
                 compositeIntegerVarcharFk2);
 
-        CompositeIntegerVarcharFk compositeIntegerVarcharFk3a
-                = new CompositeIntegerVarcharFk();
+        CompIntegerVarcharFk compositeIntegerVarcharFk3a
+                = new CompIntegerVarcharFk();
         compositeIntegerVarcharFk3a.setName(
                 "compositeIntegerVarcharFk3a");
         result.getCompositeIntegerVarcharPkList().get(2)
-                .addCompositeIntegerVarcharFk(
+                .addCompIntegerVarcharFk(
                     compositeIntegerVarcharFk3a);
         result.getCompositeIntegerVarcharFkList().add(
                 compositeIntegerVarcharFk3a);
 
-        CompositeIntegerVarcharFk compositeIntegerVarcharFk3b
-                = new CompositeIntegerVarcharFk();
+        CompIntegerVarcharFk compositeIntegerVarcharFk3b
+                = new CompIntegerVarcharFk();
         compositeIntegerVarcharFk3b.setName(
                 "compositeIntegerVarcharFk3b");
         result.getCompositeIntegerVarcharPkList().get(2)
-                .addCompositeIntegerVarcharFk(
+                .addCompIntegerVarcharFk(
                     compositeIntegerVarcharFk3b);
         result.getCompositeIntegerVarcharFkList().add(
                 compositeIntegerVarcharFk3b);
@@ -463,28 +463,28 @@ public class ForeignKeySchemaData
             ForeignKeySchemaData result)
         throws TorqueException
 {
-    CompositeNonpkFk compositeNonpkFk1a
-            = new CompositeNonpkFk();
+    CompNonpkFk compositeNonpkFk1a
+            = new CompNonpkFk();
     compositeNonpkFk1a.setName(
             "compositeNonpkFk1a");
     result.getCompositeIntegerVarcharPkList().get(0)
-            .addCompositeNonpkFk(compositeNonpkFk1a);
+            .addCompNonpkFk(compositeNonpkFk1a);
     result.getCompositeNonpkFkList().add(compositeNonpkFk1a);
 
-    CompositeNonpkFk compositeNonpkFk1b
-            = new CompositeNonpkFk();
+    CompNonpkFk compositeNonpkFk1b
+            = new CompNonpkFk();
     compositeNonpkFk1b.setName(
             "compositeNonpkFk1b");
     result.getCompositeIntegerVarcharPkList().get(0)
-            .addCompositeNonpkFk(compositeNonpkFk1b);
+            .addCompNonpkFk(compositeNonpkFk1b);
     result.getCompositeNonpkFkList().add(compositeNonpkFk1b);
 
-    CompositeNonpkFk compositeNonpkFk2
-            = new CompositeNonpkFk();
+    CompNonpkFk compositeNonpkFk2
+            = new CompNonpkFk();
     compositeNonpkFk2.setName(
             "compositeNonpkFk2");
     result.getCompositeIntegerVarcharPkList().get(1)
-            .addCompositeNonpkFk(compositeNonpkFk2);
+            .addCompNonpkFk(compositeNonpkFk2);
     result.getCompositeNonpkFkList().add(compositeNonpkFk2);
 }
 
@@ -529,17 +529,17 @@ public class ForeignKeySchemaData
         return nonPkOIntegerFkList;
     }
 
-    public List<CompositeIntegerVarcharPk> getCompositeIntegerVarcharPkList()
+    public List<CompIntegerVarcharPk> getCompositeIntegerVarcharPkList()
     {
         return compositeIntegerVarcharPkList;
     }
 
-    public List<CompositeIntegerVarcharFk> getCompositeIntegerVarcharFkList()
+    public List<CompIntegerVarcharFk> getCompositeIntegerVarcharFkList()
     {
         return compositeIntegerVarcharFkList;
     }
 
-    public List<CompositeNonpkFk> getCompositeNonpkFkList()
+    public List<CompNonpkFk> getCompositeNonpkFkList()
     {
         return compositeNonpkFkList;
     }
@@ -560,13 +560,13 @@ public class ForeignKeySchemaData
         {
             oIntegerPk.save();
         }
-        for (CompositeIntegerVarcharPk compositeIntegerVarcharPk
+        for (CompIntegerVarcharPk compositeIntegerVarcharPk
                 : compositeIntegerVarcharPkList)
         {
             compositeIntegerVarcharPk.save();
         }
     }
-    
+
     /**
      * Deletes all records in the foreign-key-schema's tables.
      *
@@ -599,12 +599,12 @@ public class ForeignKeySchemaData
         OIntegerPkPeer.doDelete(criteria);
 
         criteria.clear();
-        CompositeIntegerVarcharFkPeer.doDelete(criteria);
+        CompIntegerVarcharFkPeer.doDelete(criteria);
 
         criteria.clear();
-        CompositeNonpkFkPeer.doDelete(criteria);
+        CompNonpkFkPeer.doDelete(criteria);
 
         criteria.clear();
-        CompositeIntegerVarcharPkPeer.doDelete(criteria);
+        CompIntegerVarcharPkPeer.doDelete(criteria);
     }
 }

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/InitShutdownTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/InitShutdownTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/InitShutdownTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/InitShutdownTest.java Sat Nov 26 10:59:15 2011
@@ -61,7 +61,7 @@ public class InitShutdownTest extends Te
         }
 
         // make sure PIntegerPkPeer class is loaded
-        String dummy = PIntegerPkPeer.ID;
+        Column dummy = PIntegerPkPeer.ID;
 
         initTorque();
 

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/avalon/AvalonMapBuildersTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/avalon/AvalonMapBuildersTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/avalon/AvalonMapBuildersTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/avalon/AvalonMapBuildersTest.java Sat Nov 26 10:59:15 2011
@@ -20,6 +20,7 @@ package org.apache.torque.avalon;
 
 import org.apache.avalon.framework.component.ComponentException;
 import org.apache.fulcrum.testcontainer.BaseUnitTest;
+import org.apache.torque.BaseRuntimeTestCase;
 import org.apache.torque.TorqueException;
 import org.apache.torque.map.DatabaseMap;
 import org.apache.torque.test.AuthorPeer;
@@ -34,7 +35,7 @@ public class AvalonMapBuildersTest exten
 {
     private Torque torque = null;
     private org.apache.torque.TorqueInstance instance = null;
-    
+
     /**
      * Constructor for test.
      *
@@ -43,10 +44,10 @@ public class AvalonMapBuildersTest exten
     public AvalonMapBuildersTest(String name)
     {
         super( name );
-        
+
         // trigger ststic constructor before Torque initialization
         String testDB = AuthorPeer.DATABASE_NAME;
-        
+
         // store old instance for comparison
         instance = org.apache.torque.Torque.getInstance();
     }
@@ -54,6 +55,11 @@ public class AvalonMapBuildersTest exten
     public void setUp() throws Exception
     {
         super.setUp();
+        if (!org.apache.torque.Torque.isInit())
+        {
+            org.apache.torque.Torque.init(System.getProperty(
+                    BaseRuntimeTestCase.CONFIG_FILE_SYSTEM_PROPERTY));
+        }
         setConfigurationFileName("src/test/resources/TestComponentConfig.xml");
         setRoleFileName("src/test/resources/TestRoleConfig.xml");
         try
@@ -73,16 +79,16 @@ public class AvalonMapBuildersTest exten
     public void testMapBuilder()
     {
         DatabaseMap dbMap = null;
-        
-        try 
+
+        try
         {
             dbMap = torque.getDatabaseMap(AuthorPeer.DATABASE_NAME);
-        } 
-        catch (TorqueException e) 
+        }
+        catch (TorqueException e)
         {
             fail(e.getMessage());
         }
-        
+
         assertTrue("Table author should be in the DatabaseMap",
                 dbMap.containsTable(AuthorPeer.TABLE_NAME));
         assertFalse("Torque instances should be different", torque == instance);

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/DeleteTest.java Sat Nov 26 10:59:15 2011
@@ -575,6 +575,7 @@ public class DeleteTest extends BaseRunt
      * 
      * @throws TorqueException if reading fails.
      */
+    // TODO to ForeignKeyTestData
     private List<NullableOIntegerFk> getNullableOIntegerFkList()
             throws TorqueException
     {

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/generated/peer/FillerTest.java Sat Nov 26 10:59:15 2011
@@ -24,12 +24,12 @@ import java.util.List;
 import org.apache.torque.BaseRuntimeTestCase;
 import org.apache.torque.ForeignKeySchemaData;
 import org.apache.torque.TorqueException;
-import org.apache.torque.test.CompositeIntegerVarcharFk;
-import org.apache.torque.test.CompositeIntegerVarcharFkPeer;
-import org.apache.torque.test.CompositeIntegerVarcharPk;
-import org.apache.torque.test.CompositeIntegerVarcharPkPeer;
-import org.apache.torque.test.CompositeNonpkFk;
-import org.apache.torque.test.CompositeNonpkFkPeer;
+import org.apache.torque.test.CompIntegerVarcharFk;
+import org.apache.torque.test.CompIntegerVarcharFkPeer;
+import org.apache.torque.test.CompIntegerVarcharPk;
+import org.apache.torque.test.CompIntegerVarcharPkPeer;
+import org.apache.torque.test.CompNonpkFk;
+import org.apache.torque.test.CompNonpkFkPeer;
 import org.apache.torque.test.NonPkOIntegerFk;
 import org.apache.torque.test.NonPkOIntegerFkPeer;
 import org.apache.torque.test.NullableOIntegerFk;
@@ -74,10 +74,10 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedPrimitiveIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(
                 RequiredPIntegerFkPeer.ID);
@@ -127,7 +127,7 @@ public class FillerTest extends BaseRunt
                 fkList.get(1).getPIntegerPk(),
                 fkList.get(2).getPIntegerPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
@@ -150,10 +150,10 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedObjectIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(
                 NullableOIntegerFkPeer.ID);
@@ -169,7 +169,7 @@ public class FillerTest extends BaseRunt
         List<OIntegerPk> referencedPkList
                 = NullableOIntegerFkPeer.fillOIntegerPks(
                         fkList);
-        
+
         // returned list must contain intPk2, intPk3, intPk3
         // and the last 2 objects must not be the same objects
         assertEquals(3, referencedPkList.size());
@@ -201,7 +201,7 @@ public class FillerTest extends BaseRunt
                 fkList.get(1).getOIntegerPk(),
                 fkList.get(2).getOIntegerPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
@@ -216,7 +216,7 @@ public class FillerTest extends BaseRunt
 
     /**
      * Tests the functionality for the fillers for referenced Objects.
-     * The foreign key is a non-required object Integer column, 
+     * The foreign key is a non-required object Integer column,
      * and it does not point to the primary key of the referenced table.
      *
      * @throws Exception if a database error occurs.
@@ -224,7 +224,7 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedNonPrimaryKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
@@ -243,7 +243,7 @@ public class FillerTest extends BaseRunt
         List<OIntegerPk> referencedPkList
                 = NonPkOIntegerFkPeer.fillOIntegerPks(
                         fkList);
-        
+
         // returned list must contain intPk1, intPk1, intPk2
         // and the first 2 objects must not be the same objects
         assertEquals(3, referencedPkList.size());
@@ -275,7 +275,7 @@ public class FillerTest extends BaseRunt
                 fkList.get(0).getOIntegerPk(),
                 fkList.get(1).getOIntegerPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
@@ -297,13 +297,13 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedDuplicateObjects() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.add(NullableOIntegerFkPeer.NAME, "nullableOIntegerFk3a");
-        
+
         List<NullableOIntegerFk> fkList
                 = NullableOIntegerFkPeer.doSelect(criteria);
         assertEquals(1, fkList.size());
@@ -317,7 +317,7 @@ public class FillerTest extends BaseRunt
         List<OIntegerPk> referencedPkList
                 = NullableOIntegerFkPeer.fillOIntegerPks(
                         fkList);
-        
+
         // returned list must contain intPk3, intPk3
         // and the objects must not be the same objects
         assertEquals(2, referencedPkList.size());
@@ -343,7 +343,7 @@ public class FillerTest extends BaseRunt
                 fkList.get(0).getOIntegerPk(),
                 fkList.get(1).getOIntegerPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
@@ -356,13 +356,13 @@ public class FillerTest extends BaseRunt
     /**
      * Tests that a referenced object that is already set is re-filled
      * by a call to the filler method.
-     * 
+     *
      * @throws Exception if a database error occurs.
      */
     public void testFillReferencedAlreadySet() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
@@ -393,15 +393,15 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(
-                CompositeIntegerVarcharFkPeer.ID);
-        List<CompositeIntegerVarcharFk> fkList
-                = CompositeIntegerVarcharFkPeer.doSelect(criteria);
+                CompIntegerVarcharFkPeer.ID);
+        List<CompIntegerVarcharFk> fkList
+                = CompIntegerVarcharFkPeer.doSelect(criteria);
         assertEquals(3, fkList.size());
         assertEquals(
                 testData.getCompositeIntegerVarcharFkList().get(0).getId(),
@@ -409,10 +409,10 @@ public class FillerTest extends BaseRunt
         // TODO check that fkList entries have not yet
         //      loaded its referenced intPk object
 
-        List<CompositeIntegerVarcharPk> referencedPkList
-                = CompositeIntegerVarcharFkPeer.fillCompositeIntegerVarcharPks(
+        List<CompIntegerVarcharPk> referencedPkList
+                = CompIntegerVarcharFkPeer.fillCompIntegerVarcharPks(
                         fkList);
-        
+
         // returned list must contain compositeIntegerVarcharPk2,
         // compositeIntegerVarcharPk3, compositeIntegerVarcharPk3
         // and the last 2 objects must not be the same objects
@@ -435,28 +435,28 @@ public class FillerTest extends BaseRunt
         // and the last 2 referenced objects must not be the same objects
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(1),
-                fkList.get(0).getCompositeIntegerVarcharPk());
+                fkList.get(0).getCompIntegerVarcharPk());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(2),
-                fkList.get(1).getCompositeIntegerVarcharPk());
+                fkList.get(1).getCompIntegerVarcharPk());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(2),
-                fkList.get(2).getCompositeIntegerVarcharPk());
+                fkList.get(2).getCompIntegerVarcharPk());
         assertNotSame(
-                fkList.get(1).getCompositeIntegerVarcharPk(),
-                fkList.get(2).getCompositeIntegerVarcharPk());
+                fkList.get(1).getCompIntegerVarcharPk(),
+                fkList.get(2).getCompIntegerVarcharPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
-                fkList.get(0).getCompositeIntegerVarcharPk());
+                fkList.get(0).getCompIntegerVarcharPk());
         assertSame(
                 referencedPkList.get(1),
-                fkList.get(1).getCompositeIntegerVarcharPk());
+                fkList.get(1).getCompIntegerVarcharPk());
         assertSame(
                 referencedPkList.get(2),
-                fkList.get(2).getCompositeIntegerVarcharPk());
+                fkList.get(2).getCompIntegerVarcharPk());
     }
 
     /**
@@ -470,15 +470,15 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedNonPrimaryCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(
-                CompositeNonpkFkPeer.ID);
-        List<CompositeNonpkFk> fkList
-                = CompositeNonpkFkPeer.doSelect(criteria);
+                CompNonpkFkPeer.ID);
+        List<CompNonpkFk> fkList
+                = CompNonpkFkPeer.doSelect(criteria);
         assertEquals(3, fkList.size());
         assertEquals(
                 testData.getCompositeNonpkFkList().get(0).getId(),
@@ -486,10 +486,10 @@ public class FillerTest extends BaseRunt
         // TODO check that fkList entries have not yet
         //      loaded its referenced intPk object
 
-        List<CompositeIntegerVarcharPk> referencedPkList
-                = CompositeNonpkFkPeer.fillCompositeIntegerVarcharPks(
+        List<CompIntegerVarcharPk> referencedPkList
+                = CompNonpkFkPeer.fillCompIntegerVarcharPks(
                         fkList);
-        
+
         // returned list must contain compositeIntegerVarcharPk1,
         // compositeIntegerVarcharPk2, compositeIntegerVarcharPk2
         // and the last 2 objects must not be the same objects
@@ -512,28 +512,28 @@ public class FillerTest extends BaseRunt
         // and the first 2 referenced objects must not be the same objects
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(0),
-                fkList.get(0).getCompositeIntegerVarcharPk());
+                fkList.get(0).getCompIntegerVarcharPk());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(0),
-                fkList.get(1).getCompositeIntegerVarcharPk());
+                fkList.get(1).getCompIntegerVarcharPk());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(1),
-                fkList.get(2).getCompositeIntegerVarcharPk());
+                fkList.get(2).getCompIntegerVarcharPk());
         assertNotSame(
-                fkList.get(0).getCompositeIntegerVarcharPk(),
-                fkList.get(1).getCompositeIntegerVarcharPk());
+                fkList.get(0).getCompIntegerVarcharPk(),
+                fkList.get(1).getCompIntegerVarcharPk());
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedPkList.get(0),
-                fkList.get(0).getCompositeIntegerVarcharPk());
+                fkList.get(0).getCompIntegerVarcharPk());
         assertSame(
                 referencedPkList.get(1),
-                fkList.get(1).getCompositeIntegerVarcharPk());
+                fkList.get(1).getCompIntegerVarcharPk());
         assertSame(
                 referencedPkList.get(2),
-                fkList.get(2).getCompositeIntegerVarcharPk());
+                fkList.get(2).getCompIntegerVarcharPk());
     }
 
     /**
@@ -543,7 +543,7 @@ public class FillerTest extends BaseRunt
     public void testFillReferencedObjectRefill() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
@@ -559,11 +559,11 @@ public class FillerTest extends BaseRunt
 
         OIntegerPk changedPkObject = fkObject.getOIntegerPk();
         changedPkObject.setName("oIntegerPk2modified");
-        
+
         List<OIntegerPk> referencedPkList
                 = NullableOIntegerFkPeer.fillOIntegerPks(
                         fkList);
-        
+
         // returned list must contain unchanged new oIntegerPk2
         assertEquals(1, referencedPkList.size());
         assertEquals("oIntegerPk2", fkObject.getOIntegerPk().getName());
@@ -599,14 +599,14 @@ public class FillerTest extends BaseRunt
                 fkObject.save();
             }
         }
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(NullableOIntegerFkPeer.ID);
-        List<NullableOIntegerFk> fkObjectList 
+        List<NullableOIntegerFk> fkObjectList
             = NullableOIntegerFkPeer.doSelect(criteria);
         assertEquals(MANY, fkObjectList.size());
         // TODO assert that fkObjectList have not already loaded their pk object
-        
+
         List<OIntegerPk> oIntegerPkList
                 = NullableOIntegerFkPeer.fillOIntegerPks(fkObjectList);
 
@@ -639,10 +639,10 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingPrimitiveIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(PIntegerPkPeer.ID);
         List<PIntegerPk> pkList = PIntegerPkPeer.doSelect(criteria);
@@ -656,8 +656,8 @@ public class FillerTest extends BaseRunt
         List<RequiredPIntegerFk> referencingFkList
                 = PIntegerPkPeer.fillRequiredPIntegerFks(
                         pkList);
-        
-        // returned list must contain requiredPIntegerFk2, 
+
+        // returned list must contain requiredPIntegerFk2,
         // requiredPIntegerFk3a, requiredPIntegerFk3b
         // where the last two can be exchanged
         assertEquals(3, referencingFkList.size());
@@ -687,7 +687,7 @@ public class FillerTest extends BaseRunt
                 pkList.get(2).getRequiredPIntegerFks().contains(
                         testData.getRequiredPIntegerFkList().get(2)));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the pk list
         assertSame(
                 referencingFkList.get(0),
@@ -710,10 +710,10 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingObjectIntegerKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(OIntegerPkPeer.ID);
         List<OIntegerPk> pkList = OIntegerPkPeer.doSelect(criteria);
@@ -727,8 +727,8 @@ public class FillerTest extends BaseRunt
         List<NullableOIntegerFk> referencingFkList
                 = OIntegerPkPeer.fillNullableOIntegerFks(
                         pkList);
-        
-        // returned list must contain nullableOIntegerFk2, 
+
+        // returned list must contain nullableOIntegerFk2,
         // nullableOIntegerFk3a, nullableOIntegerFk3b
         // where the last two can be exchanged
         assertEquals(3, referencingFkList.size());
@@ -758,7 +758,7 @@ public class FillerTest extends BaseRunt
                 pkList.get(2).getNullableOIntegerFks().contains(
                         testData.getNullableOIntegerFkList().get(2)));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the pk list
         assertSame(
                 referencingFkList.get(0),
@@ -780,13 +780,13 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingDuplicateObjects() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
         criteria.add(OIntegerPkPeer.NAME, "oIntegerPk2");
-        
+
         List<OIntegerPk> pkList
                 = OIntegerPkPeer.doSelect(criteria);
         assertEquals(1, pkList.size());
@@ -800,7 +800,7 @@ public class FillerTest extends BaseRunt
         List<NullableOIntegerFk> referencedFkList
                 = OIntegerPkPeer.fillNullableOIntegerFks(
                         pkList);
-        
+
         // returned list must contain nullableOIntegerFk2, nullableOIntegerFk2
         // and the objects must not be the same objects
         assertEquals(2, referencedFkList.size());
@@ -826,7 +826,7 @@ public class FillerTest extends BaseRunt
                 pkList.get(0).getNullableOIntegerFks().get(0),
                 pkList.get(1).getNullableOIntegerFks().get(0));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the fk list
         assertSame(
                 referencedFkList.get(0),
@@ -838,7 +838,7 @@ public class FillerTest extends BaseRunt
 
     /**
      * Tests the functionality for the fillers for referenced Objects.
-     * The foreign key is a non-required object Integer column, 
+     * The foreign key is a non-required object Integer column,
      * and it does not point to the primary key of the referenced table.
      *
      * @throws Exception if a database error occurs.
@@ -846,7 +846,7 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingNonPrimaryKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
@@ -864,8 +864,8 @@ public class FillerTest extends BaseRunt
 
         List<NonPkOIntegerFk> referencingFkList
                 = OIntegerPkPeer.fillNonPkOIntegerFks(pkList);
-        
-        // returned list must contain nonPkOIntegerFk1a, nonPkOIntegerFk1b, 
+
+        // returned list must contain nonPkOIntegerFk1a, nonPkOIntegerFk1b,
         // nonPkOIntegerFk2
         assertEquals(3, referencingFkList.size());
         assertTrue(
@@ -893,7 +893,7 @@ public class FillerTest extends BaseRunt
                 pkList.get(1).getNonPkOIntegerFks().contains(
                 testData.getNonPkOIntegerFkList().get(2)));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the pk list
         assertSame(
                 referencingFkList.get(0),
@@ -917,15 +917,15 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
-        criteria.addAscendingOrderByColumn(CompositeIntegerVarcharPkPeer.ID1);
-        criteria.addAscendingOrderByColumn(CompositeIntegerVarcharPkPeer.ID2);
-        List<CompositeIntegerVarcharPk> pkList 
-                = CompositeIntegerVarcharPkPeer.doSelect(criteria);
+        criteria.addAscendingOrderByColumn(CompIntegerVarcharPkPeer.ID1);
+        criteria.addAscendingOrderByColumn(CompIntegerVarcharPkPeer.ID2);
+        List<CompIntegerVarcharPk> pkList
+                = CompIntegerVarcharPkPeer.doSelect(criteria);
         assertEquals(3, pkList.size());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(0).getPrimaryKey(),
@@ -933,11 +933,11 @@ public class FillerTest extends BaseRunt
         // TODO check that pkList entries have not yet
         //      loaded its referencing nullablePIntegerFk objects
 
-        List<CompositeIntegerVarcharFk> referencingFkList
-                = CompositeIntegerVarcharPkPeer.fillCompositeIntegerVarcharFks(
+        List<CompIntegerVarcharFk> referencingFkList
+                = CompIntegerVarcharPkPeer.fillCompIntegerVarcharFks(
                         pkList);
-        
-        // returned list must contain compositeIntegerVarcharFk2, 
+
+        // returned list must contain compositeIntegerVarcharFk2,
         // compositeIntegerVarcharFk3a, compositeIntegerVarcharFk3b
         // where the order of the last two is undefined
         assertEquals(3, referencingFkList.size());
@@ -954,30 +954,30 @@ public class FillerTest extends BaseRunt
         // The second pk entry must reference compositeIntegerVarcharFk2
         // and the third pk entry must reference compositeIntegerVarcharFk3a
         // and compositeIntegerVarcharFk3b
-        assertEquals(0, pkList.get(0).getCompositeIntegerVarcharFks().size());
-        assertEquals(1, pkList.get(1).getCompositeIntegerVarcharFks().size());
-        assertEquals(2, pkList.get(2).getCompositeIntegerVarcharFks().size());
+        assertEquals(0, pkList.get(0).getCompIntegerVarcharFks().size());
+        assertEquals(1, pkList.get(1).getCompIntegerVarcharFks().size());
+        assertEquals(2, pkList.get(2).getCompIntegerVarcharFks().size());
         assertEquals(
                 testData.getCompositeIntegerVarcharFkList().get(0),
-                pkList.get(1).getCompositeIntegerVarcharFks().get(0));
+                pkList.get(1).getCompIntegerVarcharFks().get(0));
         assertTrue(
-                pkList.get(2).getCompositeIntegerVarcharFks().contains(
+                pkList.get(2).getCompIntegerVarcharFks().contains(
                         testData.getCompositeIntegerVarcharFkList().get(1)));
         assertTrue(
-                pkList.get(2).getCompositeIntegerVarcharFks().contains(
+                pkList.get(2).getCompIntegerVarcharFks().contains(
                         testData.getCompositeIntegerVarcharFkList().get(2)));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the pk list
         assertSame(
                 referencingFkList.get(0),
-                pkList.get(1).getCompositeIntegerVarcharFks().get(0));
+                pkList.get(1).getCompIntegerVarcharFks().get(0));
         assertSame(
                 referencingFkList.get(1),
-                pkList.get(2).getCompositeIntegerVarcharFks().get(0));
+                pkList.get(2).getCompIntegerVarcharFks().get(0));
         assertSame(
                 referencingFkList.get(2),
-                pkList.get(2).getCompositeIntegerVarcharFks().get(1));
+                pkList.get(2).getCompIntegerVarcharFks().get(1));
     }
 
     /**
@@ -991,15 +991,15 @@ public class FillerTest extends BaseRunt
     public void testFillReferencingNonPrimaryCompositeKey() throws Exception
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
-        
+
         Criteria criteria = new Criteria();
-        criteria.addAscendingOrderByColumn(CompositeIntegerVarcharPkPeer.ID1);
-        criteria.addAscendingOrderByColumn(CompositeIntegerVarcharPkPeer.ID2);
-        List<CompositeIntegerVarcharPk> pkList 
-                = CompositeIntegerVarcharPkPeer.doSelect(criteria);
+        criteria.addAscendingOrderByColumn(CompIntegerVarcharPkPeer.ID1);
+        criteria.addAscendingOrderByColumn(CompIntegerVarcharPkPeer.ID2);
+        List<CompIntegerVarcharPk> pkList
+                = CompIntegerVarcharPkPeer.doSelect(criteria);
         assertEquals(3, pkList.size());
         assertEquals(
                 testData.getCompositeIntegerVarcharPkList().get(0).getPrimaryKey(),
@@ -1007,10 +1007,10 @@ public class FillerTest extends BaseRunt
         // TODO check that pkList entries have not yet
         //      loaded its referencing nullablePIntegerFk objects
 
-        List<CompositeNonpkFk> referencingFkList
-                = CompositeIntegerVarcharPkPeer.fillCompositeNonpkFks(pkList);
-        
-        // returned list must contain compositeNonpkFk1a, 
+        List<CompNonpkFk> referencingFkList
+                = CompIntegerVarcharPkPeer.fillCompNonpkFks(pkList);
+
+        // returned list must contain compositeNonpkFk1a,
         // compositeNonpkFk1b, compositeNonpkFk2
         // where the order of the first two is undefined
         assertEquals(3, referencingFkList.size());
@@ -1027,30 +1027,30 @@ public class FillerTest extends BaseRunt
         // The first pk entry must reference compositeNonpkFk1a and
         // compositeNonpkFk1b and the second pk entry must reference
         // compositeNonpkFk2
-        assertEquals(2, pkList.get(0).getCompositeNonpkFks().size());
-        assertEquals(1, pkList.get(1).getCompositeNonpkFks().size());
-        assertEquals(0, pkList.get(2).getCompositeNonpkFks().size());
+        assertEquals(2, pkList.get(0).getCompNonpkFks().size());
+        assertEquals(1, pkList.get(1).getCompNonpkFks().size());
+        assertEquals(0, pkList.get(2).getCompNonpkFks().size());
         assertTrue(
-                pkList.get(0).getCompositeNonpkFks().contains(
+                pkList.get(0).getCompNonpkFks().contains(
                         testData.getCompositeNonpkFkList().get(0)));
         assertTrue(
-                pkList.get(0).getCompositeNonpkFks().contains(
+                pkList.get(0).getCompNonpkFks().contains(
                         testData.getCompositeNonpkFkList().get(1)));
         assertEquals(
                 testData.getCompositeNonpkFkList().get(2),
-                pkList.get(1).getCompositeNonpkFks().get(0));
+                pkList.get(1).getCompNonpkFks().get(0));
 
-        // The objects in the result list must be the same objects 
+        // The objects in the result list must be the same objects
         // as the referenced objects in the pk list
         assertSame(
                 referencingFkList.get(0),
-                pkList.get(0).getCompositeNonpkFks().get(0));
+                pkList.get(0).getCompNonpkFks().get(0));
         assertSame(
                 referencingFkList.get(1),
-                pkList.get(0).getCompositeNonpkFks().get(1));
+                pkList.get(0).getCompNonpkFks().get(1));
         assertSame(
                 referencingFkList.get(2),
-                pkList.get(1).getCompositeNonpkFks().get(0));
+                pkList.get(1).getCompNonpkFks().get(0));
     }
 
     /**
@@ -1060,7 +1060,7 @@ public class FillerTest extends BaseRunt
     public void testReferencingObjectRefill() throws TorqueException
     {
         ForeignKeySchemaData.clearTablesInDatabase();
-        ForeignKeySchemaData testData 
+        ForeignKeySchemaData testData
                 = ForeignKeySchemaData.getDefaultTestData();
         testData.save();
 
@@ -1073,13 +1073,13 @@ public class FillerTest extends BaseRunt
                 testData.getOIntegerPkList().get(1).getId(),
                 pkList.get(0).getId());
 
-        NullableOIntegerFk changedFkObject 
+        NullableOIntegerFk changedFkObject
                 = pkObject.getNullableOIntegerFks().get(0);
         changedFkObject.setName("nullableOIntegerFk2Modified");
-        
+
         List<NullableOIntegerFk> referencingFkList
                 = OIntegerPkPeer.fillNullableOIntegerFks(pkList);
-        
+
         // returned list must contain unchanged new nullableOIntegerFk2
         assertEquals(1, referencingFkList.size());
         assertEquals("nullableOIntegerFk2", referencingFkList.get(0).getName());
@@ -1119,13 +1119,13 @@ public class FillerTest extends BaseRunt
                 fkObjectB.save();
             }
         }
-        
+
         Criteria criteria = new Criteria();
         criteria.addAscendingOrderByColumn(OIntegerPkPeer.ID);
         List<OIntegerPk> pkObjectList = OIntegerPkPeer.doSelect(criteria);
         assertEquals(MANY, pkObjectList.size());
         // TODO assert that pkObjectList have not already loaded their fk objects
-        
+
         List<NullableOIntegerFk> nullableOIntegerFkList
                 = OIntegerPkPeer.fillNullableOIntegerFks(pkObjectList);
 

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/map/DatabaseMapTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/map/DatabaseMapTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/map/DatabaseMapTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/map/DatabaseMapTest.java Sat Nov 26 10:59:15 2011
@@ -34,13 +34,13 @@ import org.apache.torque.TorqueException
 public class DatabaseMapTest extends BaseRuntimeTestCase
 {
 
-    public static final String TABLE_NAME1 = "Not_Used_Before_Map_Init";
+    public static final String TABLE_NAME1 = "NOT_USED_BEFORE_MAP_INIT";
 
-    public static final String DATABASE_NAME = "bookstore";
+    public static final String DATABASE_NAME = "databaseMapInit";
 
     public static final String INVALID_DATABASE_NAME = "erotskoob";
 
-    public static final String TABLE_NAME2 = "After_NotUsedBeforeMapInit";
+    public static final String TABLE_NAME2 = "SECOND_MAP_INIT_TABLE";
 
     public static final String[] COLUMN_NAMES =
     {
@@ -61,10 +61,10 @@ public class DatabaseMapTest extends Bas
     public void testDatabaseMapInitialize() throws Exception
     {
         // Get default schema DB
-        DatabaseMap map = Torque.getDatabaseMap();
+        DatabaseMap map = Torque.getDatabaseMap(DATABASE_NAME);
         TableMap tMap = map.getTable(TABLE_NAME1);
         assertTrue(
-                "Did not expect to find NotUsedBeforeMapInit table before " + 
+                "Did not expect to find NotUsedBeforeMapInit table before " +
                 "initialize!",
                 tMap == null);
         map.initialize();
@@ -83,7 +83,7 @@ public class DatabaseMapTest extends Bas
      * The default database is bookstore<br>
      * The book table has columns ordered as in COLUMN_NAMES property<br>
      * </ul>
-     * 
+     *
      * @throws TorqueException
      */
     public void testColumnOrder() throws TorqueException
@@ -102,8 +102,8 @@ public class DatabaseMapTest extends Bas
             String upperCaseExpected = expected.toUpperCase();
             assertTrue("TableMap for " + TABLE_NAME1
                     + " did not preserve XML column order!  Expected "
-                    + expected + " but found " + 
-                    cName, cName.equals(expected) || 
+                    + expected + " but found " +
+                    cName, cName.equals(expected) ||
                         cName.equals(upperCaseExpected));
         }
     }
@@ -116,7 +116,7 @@ public class DatabaseMapTest extends Bas
      * The default database is bookstore<br>
      * TABLE_NAME1 is followed by TABLE_NAME2 in the array<br>
      * </ul>
-     * 
+     *
      * @throws TorqueException
      */
     public void testTableOrder() throws TorqueException
@@ -124,23 +124,15 @@ public class DatabaseMapTest extends Bas
         DatabaseMap map = Torque.getDatabaseMap(DATABASE_NAME);
         map.initialize();
         TableMap[] tables = map.getTables();
-        boolean found1 = false;
-        int i;
-        for (i = 0; i < tables.length; i++)
-        {
-            String tName = tables[i].getName();
-            if (tName.equals(TABLE_NAME1))
-            {
-                found1 = true;
-                break;
-            }
-        }
-        assertTrue("XML Table order not preserved!\nDid not find table '"
-                + TABLE_NAME1 + "' in DatabaseMap.getTables() array!", found1);
-        assertTrue("XML Table order not preserved!\nDid not find table '"
+        assertEquals("XML Table order not preserved!\nDid not find table '"
+                + TABLE_NAME1 + "' in DatabaseMap.getTables() array!",
+            TABLE_NAME1,
+            tables[0].getName());
+        assertEquals("XML Table order not preserved!\nDid not find table '"
                 + TABLE_NAME2 + "' after '" + TABLE_NAME1
-                + " in DatabaseMap.getTables() array!", TABLE_NAME2
-                .equals(tables[i + 1].getName()));
+                + " in DatabaseMap.getTables() array!",
+            TABLE_NAME2,
+            tables[1].getName());
     }
 
     /**
@@ -150,11 +142,11 @@ public class DatabaseMapTest extends Bas
      */
     public void testExternalSchemaTables() throws TorqueException
     {
-        DatabaseMap map = Torque.getDatabaseMap(DATABASE_NAME);
+        DatabaseMap map = Torque.getDatabaseMap();
         map.initialize();
 
         TableMap table = map.getTable("ext");
-        assertTrue("Did not find external schema table, 'ext'!", 
+        assertTrue("Did not find external schema table, 'ext'!",
                     table != null);
 
         table = map.getTable("extext");
@@ -171,13 +163,21 @@ public class DatabaseMapTest extends Bas
         map.initialize();
         TableMap table = map.getTable(TABLE_NAME1);
 
-        validateAttribute("TableMap Javaname", "UninitializedTable", table
+        validateAttribute("TableMap Javaname", "NotUsedBeforeMapInit", table
                 .getJavaName());
-        validateAttribute("TableMap description", "A table description", table
-                .getDescription());
+        validateAttribute(
+                "TableMap description",
+                "Table used for database map initialisation checks",
+                table.getDescription());
         assertTrue("TableMap OM Class was null!", table.getOMClass() != null);
         assertTrue("TableMap Peer Class was null!",
                 table.getPeerClass() != null);
+
+        table = map.getTable(TABLE_NAME2);
+        validateAttribute(
+                "TableMap Javaname",
+                "SecondMapInit",
+                table.getJavaName());
     }
 
     /**
@@ -192,7 +192,7 @@ public class DatabaseMapTest extends Bas
         ColumnMap column = table.getColumn("id");
         // Handle torque.deprecated.uppercasePeer=true problems
         if ( column == null ) {
-            column = table.getColumn("ID");  
+            column = table.getColumn("ID");
         }
 
         validateAttribute("Column JavaName", "Id", column.getJavaName());
@@ -217,7 +217,7 @@ public class DatabaseMapTest extends Bas
         column = table.getColumn("one");
         // Handle torque.deprecated.uppercasePeer=true problems
         if ( column == null ) {
-            column = table.getColumn("ONE");  
+            column = table.getColumn("ONE");
         }
         assertTrue(
             "Column isProtected attribute returned false instead of true!",
@@ -229,9 +229,9 @@ public class DatabaseMapTest extends Bas
         column = table.getColumn("three");
         // Handle torque.deprecated.uppercasePeer=true problems
         if ( column == null ) {
-            column = table.getColumn("THREE");  
+            column = table.getColumn("THREE");
         }
-        assertTrue("Column position attribute != 4", 
+        assertTrue("Column position attribute != 4",
                     column.getPosition() == 4);
     }
 
@@ -246,14 +246,14 @@ public class DatabaseMapTest extends Bas
         List<ForeignKeyMap> foreignKeys = table.getForeignKeys();
         assertEquals(1, foreignKeys.size());
         ForeignKeyMap foreignKey = foreignKeys.get(0);
-        assertEquals("CIRCULAR_REFERENCE_A", foreignKey.getForeignTableName());
+        assertEquals(TABLE_NAME2, foreignKey.getForeignTableName());
         assertEquals(1, foreignKey.getColumns().size());
         ForeignKeyMap.ColumnPair columnPair = foreignKey.getColumns().get(0);
         assertEquals(
                 "three",
                 columnPair.getLocal().getColumnName());
         assertEquals(
-                "CIRCULAR_REFERENCE_A_ID",
+                "id",
                 columnPair.getForeign().getColumnName());
     }
 
@@ -275,7 +275,7 @@ public class DatabaseMapTest extends Bas
 
         InheritanceMap[] inhArray = column.getInheritanceMaps();
 
-        assertTrue("Did not get 3 mappings back!", inhArray.length == 3);
+        assertEquals("Did not get 3 mappings back!", 3, inhArray.length);
         InheritanceMap inh = column.getInheritanceMap("C");
         assertTrue("Inheritance map did not preserve XML order!", inh.getKey()
                 .equals(inhArray[1].getKey()));
@@ -283,7 +283,7 @@ public class DatabaseMapTest extends Bas
         validateAttribute("Inheritance className", "MapInheritanceChildC", inh
                 .getClassName());
         validateAttribute("Inheritance extends",
-                "org.apache.torque.test.UninitializedTable", inh.getExtends());
+                "org.apache.torque.test.NotUsedBeforeMapInit", inh.getExtends());
     }
 
     /**
@@ -341,8 +341,8 @@ public class DatabaseMapTest extends Bas
      * Validate that the attribute value matches
      * @param name
      */
-    protected void validateAttribute(String name, 
-                                     String expected, 
+    protected void validateAttribute(String name,
+                                     String expected,
                                      String result)
     {
         assertTrue(name + " attribute not set correctly!\n Expected '"

Modified: db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java?rev=1206426&r1=1206425&r2=1206426&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java (original)
+++ db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java Sat Nov 26 10:59:15 2011
@@ -23,11 +23,12 @@ import java.math.BigDecimal;
 import java.util.Date;
 
 import org.apache.torque.BaseRuntimeTestCase;
+import org.apache.torque.Column;
 import org.apache.torque.TorqueException;
 import org.apache.torque.test.TypesObject;
+import org.apache.torque.test.TypesObjectPeer;
 import org.apache.torque.test.TypesPrimitive;
 import org.apache.torque.test.TypesPrimitivePeer;
-import org.apache.torque.test.TypesObjectPeer;
 
 /**
  * Test the various setBy and getBy methods that can be used to access field
@@ -153,7 +154,7 @@ public class OMByNameMethodsTest extends
             new Double(1.0)    //" PDouble"
     };
 
-    public static final String[] OBJECT_PEER_NAMES =
+    public static final Column[] OBJECT_PEER_NAMES =
     {
         TypesObjectPeer.O_BIT,
         TypesObjectPeer.O_TINYINT,
@@ -180,7 +181,7 @@ public class OMByNameMethodsTest extends
         TypesObjectPeer.O_DOUBLE
     };
 
-    public static final String[] PRIMITIVE_PEER_NAMES =
+    public static final Column[] PRIMITIVE_PEER_NAMES =
     {
         TypesPrimitivePeer.P_BIT,
         TypesPrimitivePeer.P_TINYINT,
@@ -457,7 +458,8 @@ public class OMByNameMethodsTest extends
             for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
             {
                 boolean status = objectTypes.setByPeerName(
-                        OBJECT_PEER_NAMES[i], OBJECT_TEST_VALUES[i]);
+                        OBJECT_PEER_NAMES[i].getSqlExpression(),
+                        OBJECT_TEST_VALUES[i]);
                 assertTrue("setByPeerName returned false setting column "
                         + OBJECT_PEER_NAMES[i], status);
             }
@@ -483,7 +485,8 @@ public class OMByNameMethodsTest extends
             for (int i = 0; i < PRIMITIVE_PEER_NAMES.length; i++)
             {
                 boolean status = primitiveTypes.setByPeerName(
-                        PRIMITIVE_PEER_NAMES[i], OBJECT_TEST_VALUES[i]);
+                        PRIMITIVE_PEER_NAMES[i].getSqlExpression(),
+                        OBJECT_TEST_VALUES[i]);
                 assertTrue("setByPeerName returned false setting column "
                         + PRIMITIVE_PEER_NAMES[i], status);
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message