db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1544331 - in /db/torque/torque4/trunk: torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java
Date Thu, 21 Nov 2013 21:34:00 GMT
Author: tfischer
Date: Thu Nov 21 21:33:59 2013
New Revision: 1544331

URL: http://svn.apache.org/r1544331
Log:
TORQUE-304 fix getPeerByName generated incorrectly 

Modified:
    db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm
    db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java

Modified: db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm?rev=1544331&r1=1544330&r2=1544331&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm
(original)
+++ db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/getByNameMethods.vm
Thu Nov 21 21:33:59 2013
@@ -188,7 +188,7 @@
   #set ( $columnFieldType = ${columnElement.getAttribute("fieldType")} )
   #set ( $getter = ${columnElement.getAttribute("getter")} )
   #set ( $peerColumnName = ${columnElement.getAttribute("peerColumnName")} )
-        if (name.equals(${peerName}.${peerColumnName}))
+        if (name.equals(${peerName}.${peerColumnName}.getSqlExpression()))
         {
   #if ($columnFieldType == "int")
             return new Integer(${getter}());

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=1544331&r1=1544330&r2=1544331&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
Thu Nov 21 21:33:59 2013
@@ -25,6 +25,7 @@ import java.util.Date;
 import org.apache.torque.BaseDatabaseTestCase;
 import org.apache.torque.Column;
 import org.apache.torque.TorqueException;
+import org.apache.torque.map.ColumnMap;
 import org.apache.torque.test.dbobject.TypesObject;
 import org.apache.torque.test.dbobject.TypesPrimitive;
 import org.apache.torque.test.peer.TypesObjectPeer;
@@ -121,20 +122,20 @@ public class OMByNameMethodsTest extends
             "PBigint", // long
             "PFloat", // double
             "PReal", // float
-            // "PNumeric", //BigDecimal - Skipped because same as Object
-            // "PDecimal", //BigDecimal - Skipped because same as Object
-            // "PChar", //String - Skipped because same as Object
-            // "PVarchar", //String - Skipped because same as Object
-            // "PLongvarchar", //String - Skipped because same as Object
-            // "PDate", //Date - Skipped because same as Object
-            // "PTime", //Date - Skipped because same as Object
+            "PNumeric", //BigDecimal - Skipped because same as Object
+            "PDecimal", //BigDecimal - Skipped because same as Object
+            "PChar", //String - Skipped because same as Object
+            "PVarchar", //String - Skipped because same as Object
+            "PLongvarchar", //String - Skipped because same as Object
+            "PDate", //Date - Skipped because same as Object
+            "PTime", //Date - Skipped because same as Object
             "PInteger", // int
-            // "PTimestamp", //Date - Skipped because same as Object
-            // "PBinary", //byte[] - Skipped because same as Object
-            // "PVarbinary", //byte[] - Skipped because same as Object
-            // "PLongvarbinary", //byte[] - Skipped because same as Object
-            // "PBlob", //byte[] - Skipped because same as Object
-            // "PClob", //String - Skipped because same as Object
+            "PTimestamp", //Date - Skipped because same as Object
+            "PBinary", //byte[] - Skipped because same as Object
+            "PVarbinary", //byte[] - Skipped because same as Object
+            "PLongvarbinary", //byte[] - Skipped because same as Object
+            "PBlob", //byte[] - Skipped because same as Object
+            "PClob", //String - Skipped because same as Object
             "PBooleanint", // boolean
             "PBooleanchar", // boolean
             "PDouble" // double
@@ -148,7 +149,32 @@ public class OMByNameMethodsTest extends
             new Long((long) 1.0), // "PBigint",
             new Double(1.0), // "PFloat",
             new Float(1.0), // "PReal",
+            new BigDecimal(1.0), // "PNumeric",
+            new BigDecimal(1.0), // "PDecimal",
+            "OChar_TEST_VALUE", // "PChar",
+            "OVarchar_TEST_VALUE", // "PVarchar",
+            "OLongvarchar_TEST_VALUE", // "PLongvarchar",
+            new Date(1000000000l), // "PDate",
+            new Date(1000000000l), // "PTime",
             new Integer(1), // "PInteger",
+            new Date(1000000000l), // "PTimestamp",
+            new byte[]
+            {
+                    1, 1, 1
+            }, // "PBinary",
+            new byte[]
+            {
+                    1, 1, 1
+            }, // "PVarbinary",
+            new byte[]
+            {
+                    1, 1, 1
+            }, // "PLongvarbinary",
+            new byte[]
+            {
+                    1, 1, 1
+            }, // "PBlob",
+            "OClob_TEST_VALUE", // "PClob",
             new Boolean(true), // "PBooleanint",
             new Boolean(true), // "PBooleanchar",
             new Double(1.0)    //" PDouble"
@@ -181,7 +207,7 @@ public class OMByNameMethodsTest extends
         TypesObjectPeer.O_DOUBLE
     };
 
-    public static final Column[] PRIMITIVE_PEER_NAMES =
+    public static final ColumnMap[] PRIMITIVE_PEER_NAMES =
     {
         TypesPrimitivePeer.P_BIT,
         TypesPrimitivePeer.P_TINYINT,
@@ -235,100 +261,7 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        String eMsg = "Did not get expected value for object column: ";
-        int iValue = 0;
-        // "OBit",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBit()));
-        // "OTinyint",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOTinyint()));
-        // "OSmallint",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOSmallint()));
-        // "OBigint",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBigint()));
-        // "OFloat",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOFloat()));
-        // "OReal",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOReal()));
-        // "ONumeric",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getONumeric()));
-        // "ODecimal",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getODecimal()));
-        // "OChar",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOChar()));
-        // "OVarchar",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOVarchar()));
-        // "OLongvarchar",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOLongvarchar()));
-        // "ODate",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getODate()));
-        // "OTime",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOTime()));
-        // "OInteger",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOInteger()));
-        // "OTimestamp",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOTimestamp()));
-        // "OBinary",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBinary()));
-        // "OVarbinary",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOVarbinary()));
-        // "OLongvarbinary",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOLongvarbinary()));
-        // "OBlob",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBlob()));
-        // "OClob",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOClob()));
-        // "OBooleanint",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBooleanint()));
-        // "OBooleanchar",
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getOBooleanchar()));
-        // "ODouble"
-        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
-                OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
-                        .getODouble()));
+        assertValues((TypesObject) objectTypes);
         // Test Primitive Types
         ColumnAccessByName primitiveTypes = new TypesPrimitive();
         try
@@ -348,37 +281,7 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        eMsg = "Did not get expected value for primitive column: ";
-        // "PBit", true, //boolean
-        assertTrue(eMsg + "PBit",
-                ((TypesPrimitive) primitiveTypes).getPBit() == true);
-        // "PTinyint", (byte) 1 //byte
-        assertTrue(eMsg + "PTinyint", ((TypesPrimitive) primitiveTypes)
-                .getPTinyint() == (byte) 1);
-        // "PSmallint", (short) 1 //short
-        assertTrue(eMsg + "PSmallint", ((TypesPrimitive) primitiveTypes)
-                .getPSmallint() == (short) 1);
-        // "PBigint", (long) 1.0 //long
-        assertTrue(eMsg + "PBigint", ((TypesPrimitive) primitiveTypes)
-                .getPBigint() == (long) 1.0);
-        // "PFloat", 1.0 //double
-        assertTrue(eMsg + "PFloat", ((TypesPrimitive) primitiveTypes)
-                .getPFloat() == 1.0);
-        // "PReal", 1.0 //float
-        assertTrue(eMsg + "PReal",
-                ((TypesPrimitive) primitiveTypes).getPReal() == 1.0);
-        // "PInteger", 1 //int
-        assertTrue(eMsg + "PInteger", ((TypesPrimitive) primitiveTypes)
-                .getPInteger() == 1);
-        // "PBooleanint", true, //boolean
-        assertTrue(eMsg + "PBooleanint", ((TypesPrimitive) primitiveTypes)
-                .getPBooleanint() == true);
-        // "PBooleanchar", true, //boolean
-        assertTrue(eMsg + "PBooleanchar", ((TypesPrimitive) primitiveTypes)
-                .getPBooleanchar() == true);
-        // "PDouble" 1.0 //double
-        assertTrue(eMsg + "PDouble", ((TypesPrimitive) primitiveTypes)
-                .getPDouble() == 1.0);
+        assertValues((TypesPrimitive) primitiveTypes);
     }
 
     /*
@@ -466,12 +369,7 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        String eMsg = "Did not get expected value for object column: ";
-        for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
-        {
-            assertTrue(eMsg + OBJECT_COLUMN_NAMES[i], OBJECT_TEST_VALUES[i]
-                    .equals(objectTypes.getByName(OBJECT_COLUMN_NAMES[i])));
-        }
+        assertValues((TypesObject) objectTypes);
 
         // Test Primitive Types
         ColumnAccessByName primitiveTypes = new TypesPrimitive();
@@ -493,11 +391,65 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
+        assertValues((TypesPrimitive) primitiveTypes);
+    }
+
+    /**
+     * Validate that the getByPeerName methods work as expected for all types.
+     *
+     * @throws Exception if the test fails
+     */
+    public void testGetByPeerNameMethod() throws Exception
+    {
+        // Testing GetByName method for Object Types
+        ColumnAccessByName objectTypes = new TypesObject();
+        try
         {
-            assertTrue(eMsg + PRIMITIVE_COLUMN_NAMES[i],
-                           PRIMITIVE_TEST_VALUES[i].equals(
-                           primitiveTypes.getByName(PRIMITIVE_COLUMN_NAMES[i])));
+            for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
+            {
+                objectTypes.setByName(OBJECT_COLUMN_NAMES[i],
+                        OBJECT_TEST_VALUES[i]);
+            }
+        }
+        catch (TorqueException e)
+        {
+            fail("Exception caught trying to call TypesObject.setByName() "
+                 + "method!\nWas OM generated with torque.addGetByNameMethod "
+                 + "property = true?\nError message was: '" + e.getMessage()
+                 + "'");
+        }
+        String eMsg = "Did not get expected value for object column: ";
+        for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
+        {
+            assertEquals(eMsg + OBJECT_PEER_NAMES[i],
+                    OBJECT_TEST_VALUES[i],
+                    objectTypes.getByPeerName(
+                            OBJECT_PEER_NAMES[i].getSqlExpression()));
+        }
+
+        // Test Primative Types
+        ColumnAccessByName primitiveTypes = new TypesPrimitive();
+        try
+        {
+            for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
+            {
+                primitiveTypes.setByName(PRIMITIVE_COLUMN_NAMES[i],
+                        PRIMITIVE_TEST_VALUES[i]);
+            }
+        }
+        catch (TorqueException e)
+        {
+            fail("Exception caught trying to call TypesObject.setByName() "
+                 + "method!\nWas OM generated with torque.addGetByNameMethod "
+                 + "property = true?\nError message was: '" + e.getMessage()
+                 + "'");
+        }
+        for (int i = 0; i < PRIMITIVE_PEER_NAMES.length; i++)
+        {
+            assertEquals(eMsg + PRIMITIVE_PEER_NAMES[i],
+                        PRIMITIVE_TEST_VALUES[i],
+                        primitiveTypes.getByPeerName(
+                                PRIMITIVE_PEER_NAMES[i].getSqlExpression()));
         }
     }
 
@@ -527,12 +479,7 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        String eMsg = "Did not get expected value for object column: ";
-        for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
-        {
-            assertTrue(eMsg + OBJECT_COLUMN_NAMES[i], OBJECT_TEST_VALUES[i]
-                    .equals(objectTypes.getByName(OBJECT_COLUMN_NAMES[i])));
-        }
+        assertValues((TypesObject) objectTypes);
 
         // Test Primitive Types
         ColumnAccessByName primitiveTypes = new TypesPrimitive();
@@ -553,13 +500,64 @@ public class OMByNameMethodsTest extends
                  + "property = true?\nError message was: '" + e.getMessage()
                  + "'");
         }
-        for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
+        assertValues((TypesPrimitive) primitiveTypes);
+    }
+
+    /**
+     * Validate that the getByPosition methods work as expected for all types.
+     *
+     * @throws Exception if the test fails
+     */
+    public void testGetByPositionMethod() throws Exception
+    {
+        // Testing GetByName method for Object Types
+        ColumnAccessByName objectTypes = new TypesObject();
+        try
         {
-            assertTrue(eMsg + PRIMITIVE_COLUMN_NAMES[i],
-            			PRIMITIVE_TEST_VALUES[i].equals(
-            			primitiveTypes.getByName(PRIMITIVE_COLUMN_NAMES[i])));
+            for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
+            {
+                objectTypes.setByName(OBJECT_COLUMN_NAMES[i],
+                        OBJECT_TEST_VALUES[i]);
+            }
+        }
+        catch (TorqueException e)
+        {
+            fail("Exception caught trying to call TypesObject.setByName() "
+                 + "method!\nWas OM generated with torque.addGetByNameMethod "
+                 + "property = true?\nError message was: '" + e.getMessage()
+                 + "'");
+        }
+        String eMsg = "Did not get expected value for object column: ";
+        for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
+        {
+            assertEquals(eMsg + (i + 1) + " (" + OBJECT_PEER_NAMES[i] + ")",
+                    OBJECT_TEST_VALUES[i],
+                     objectTypes.getByPosition(i + 1));
         }
 
+        // Test Primative Types
+        ColumnAccessByName primitiveTypes = new TypesPrimitive();
+        try
+        {
+            for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
+            {
+                primitiveTypes.setByName(PRIMITIVE_COLUMN_NAMES[i],
+                        PRIMITIVE_TEST_VALUES[i]);
+            }
+        }
+        catch (TorqueException e)
+        {
+            fail("Exception caught trying to call TypesObject.setByName() "
+                 + "method!\nWas OM generated with torque.addGetByNameMethod "
+                 + "property = true?\nError message was: '" + e.getMessage()
+                 + "'");
+        }
+        for (int i = 0; i < PRIMITIVE_PEER_NAMES.length; i++)
+        {
+            assertEquals(eMsg + (i + 1) + " (" + PRIMITIVE_PEER_NAMES[i] + ")",
+                    PRIMITIVE_TEST_VALUES[i],
+                    primitiveTypes.getByPosition(i + 1));
+        }
     }
 
     /*
@@ -651,4 +649,138 @@ public class OMByNameMethodsTest extends
         assertTrue("primitiveTypes.setByName(\"PBit\",null) allowed "
                         +  "a null value!", error);
     }
+
+    /**
+     * Checks that values were set to the correct value.
+     *
+     * @param primitiveTypes the object to check the values in.
+     */
+    private void assertValues(final TypesPrimitive primitiveTypes)
+    {
+        String eMsg;
+        eMsg = "Did not get expected value for primitive column: ";
+        // "PBit", true, //boolean
+        assertTrue(eMsg + "PBit", primitiveTypes.getPBit() == true);
+        // "PTinyint", (byte) 1 //byte
+        assertTrue(eMsg + "PTinyint", primitiveTypes.getPTinyint() == (byte) 1);
+        // "PSmallint", (short) 1 //short
+        assertTrue(eMsg + "PSmallint", primitiveTypes.getPSmallint() == (short) 1);
+        // "PBigint", (long) 1.0 //long
+        assertTrue(eMsg + "PBigint", primitiveTypes.getPBigint() == (long) 1.0);
+        // "PFloat", 1.0 //double
+        assertTrue(eMsg + "PFloat", primitiveTypes.getPFloat() == 1.0);
+        // "PReal", 1.0 //float
+        assertTrue(eMsg + "PReal", primitiveTypes.getPReal() == 1.0);
+        // "PInteger", 1 //int
+        assertTrue(eMsg + "PInteger", primitiveTypes.getPInteger() == 1);
+        // "PBooleanint", true, //boolean
+        assertTrue(eMsg + "PBooleanint", primitiveTypes.getPBooleanint() == true);
+        // "PBooleanchar", true, //boolean
+        assertTrue(eMsg + "PBooleanchar", primitiveTypes.getPBooleanchar() == true);
+        // "PDouble" 1.0 //double
+        assertTrue(eMsg + "PDouble", primitiveTypes.getPDouble() == 1.0);
+    }
+
+    /**
+     * Checks that values were set to the correct value.
+     *
+     * @param objectTypes the object to check the values in.
+     */
+    private void assertValues(final TypesObject objectTypes)
+    {
+        String eMsg = "Did not get expected value for object column: ";
+        int iValue = 0;
+        // "OBit",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBit()));
+        // "OTinyint",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOTinyint()));
+        // "OSmallint",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOSmallint()));
+        // "OBigint",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBigint()));
+        // "OFloat",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOFloat()));
+        // "OReal",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOReal()));
+        // "ONumeric",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getONumeric()));
+        // "ODecimal",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getODecimal()));
+        // "OChar",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOChar()));
+        // "OVarchar",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOVarchar()));
+        // "OLongvarchar",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOLongvarchar()));
+        // "ODate",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getODate()));
+        // "OTime",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOTime()));
+        // "OInteger",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOInteger()));
+        // "OTimestamp",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOTimestamp()));
+        // "OBinary",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBinary()));
+        // "OVarbinary",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOVarbinary()));
+        // "OLongvarbinary",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOLongvarbinary()));
+        // "OBlob",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBlob()));
+        // "OClob",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOClob()));
+        // "OBooleanint",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBooleanint()));
+        // "OBooleanchar",
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getOBooleanchar()));
+        // "ODouble"
+        assertTrue(eMsg + OBJECT_COLUMN_NAMES[iValue],
+                OBJECT_TEST_VALUES[iValue++].equals(objectTypes
+                        .getODouble()));
+    }
 }



---------------------------------------------------------------------
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