* known object and primitive types.
*/
public void testSetByPeerNameMethod() throws Exception
{
// Testing GetByName method for Object Types
ColumnAccessByName objectTypes = new TypesObject();
try
{
for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
{
boolean status = objectTypes.setByPeerName(
OBJECT_PEER_NAMES[i].getSqlExpression(),
OBJECT_TEST_VALUES[i]);
assertTrue("setByPeerName returned false setting column "
+ OBJECT_PEER_NAMES[i], status);
}
}
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_COLUMN_NAMES.length; i++)
{
assertTrue(eMsg + OBJECT_COLUMN_NAMES[i], OBJECT_TEST_VALUES[i]
.equals(objectTypes.getByName(OBJECT_COLUMN_NAMES[i])));
}
// Test Primitive Types
ColumnAccessByName primitiveTypes = new TypesPrimitive();
try