Author: tfischer
Date: Sun Jul 31 13:59:17 2011
New Revision: 1152582
URL: http://svn.apache.org/viewvc?rev=1152582&view=rev
Log:
TORQUE-147: remove inheritance of generated dBObject classes from BaseObject
and removed BaseObject
Added:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/ColumnAccessByName.java
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/equalsHashCode.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
Modified:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/Persistent.java
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/options.properties
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/outlets/dbObject.xml
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
db/torque/torque4/trunk/torque-test/src/test/java/org/apache/torque/om/OMByNameMethodsTest.java
Added:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/ColumnAccessByName.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/ColumnAccessByName.java?rev=1152582&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/ColumnAccessByName.java
(added)
+++
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/ColumnAccessByName.java
Sun Jul 31 13:59:17 2011
@@ -0,0 +1,106 @@
+package org.apache.torque.om;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.torque.TorqueException;
+
+/**
+ * Define accessors by name.
+ *
+ * @version $Id: BaseObject.java 1103319 2011-05-15 11:24:21Z tfischer $
+ */
+public interface ColumnAccessByName
+{
+ /**
+ * Retrieves a field from the object by name.
+ *
+ * @param field The name of the field to retrieve.
+ *
+ * @return The retrieved field value
+ */
+ public Object getByName(String field);
+
+ /**
+ * Set a field in the object by field (Java) name.
+ *
+ * @param name field name.
+ * @param value field value.
+ *
+ * @return True if value was set, false if not (invalid name / protected
+ * field).
+ *
+ * @throws IllegalArgumentException if object type of value does not match
+ * field object type.
+ * @throws TorqueException If a problem occurs with the set[Field] method.
+ */
+ public boolean setByName(String name, Object value)
+ throws TorqueException;
+
+ /**
+ * Retrieves a field from the object by name passed in as a String.
+ *
+ * @param name field name.
+ *
+ * @return value of the field.
+ */
+ public Object getByPeerName(String name);
+
+ /**
+ * Set field values by Peer Field Name-
+ *
+ * @param name field name.
+ * @param value field value.
+ *
+ * @return True if value was set, false if not (invalid name / protected
+ * field).
+ *
+ * @throws IllegalArgumentException if object type of value does not match
+ * field object type.
+ * @throws TorqueException If a problem occurs with the set[Field] method.
+ */
+ public boolean setByPeerName(String name, Object value)
+ throws TorqueException;
+
+ /**
+ * Retrieves a field from the object by position as specified in a database
+ * schema for example.
+ *
+ * @param pos field position.
+ *
+ * @return the value of the field.
+ */
+ public Object getByPosition(int pos);
+
+ /**
+ * Set field values by it's position (zero based) in the XML schema.
+ *
+ * @param position The field position.
+ * @param value field value.
+ *
+ * @return True if value was set, false if not (invalid position /
protected
+ * field).
+ *
+ * @throws IllegalArgumentException if object type of value does not match
+ * field object type.
+ * @throws TorqueException If a problem occurs with the set[Field] method.
+ */
+ public boolean setByPosition(int position, Object value)
+ throws TorqueException;
+}
Modified:
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/Persistent.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/Persistent.java?rev=1152582&r1=1152581&r2=1152582&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/Persistent.java
(original)
+++
db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/om/Persistent.java
Sun Jul 31 13:59:17 2011
@@ -21,6 +21,8 @@ package org.apache.torque.om;
import java.sql.Connection;
+import org.apache.torque.TorqueException;
+
/**
* This interface defines methods related to saving an object
*
@@ -41,18 +43,18 @@ public interface Persistent
* Sets the PrimaryKey for the object.
*
* @param primaryKey The new PrimaryKey for the object.
- * @throws Exception This method might throw an exception
+ * @throws TorqueException This method might throw an exception
*/
- void setPrimaryKey(ObjectKey primaryKey) throws Exception;
+ void setPrimaryKey(ObjectKey primaryKey) throws TorqueException;
/**
* Sets the PrimaryKey for the object.
*
* @param primaryKey the String should be of the form produced by
* ObjectKey.toString().
- * @throws Exception This method might throw an exception
+ * @throws TorqueException This method might throw an exception
*/
- void setPrimaryKey(String primaryKey) throws Exception;
+ void setPrimaryKey(String primaryKey) throws TorqueException;
/**
* Returns whether the object has been modified, since it was
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/options.properties
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/options.properties?rev=1152582&r1=1152581&r2=1152582&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/options.properties
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/conf/options.properties
Sun Jul 31 13:59:17 2011
@@ -149,7 +149,7 @@ torque.om.complexObjectModel.defaultFill
# The default base class for all data objects.
# can be overridden by setting the baseClass attribute on a table.
-torque.om.dbObjectDefaultBaseClass = org.apache.torque.om.BaseObject
+torque.om.dbObjectDefaultBaseClass =
# The base class for all Peer classes
torque.om.basePeerBaseClass = org.apache.torque.util.BasePeer
# The base class for all Peer implementation classes
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/outlets/dbObject.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/outlets/dbObject.xml?rev=1152582&r1=1152581&r2=1152582&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/outlets/dbObject.xml
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/outlets/dbObject.xml
Sun Jul 31 13:59:17 2011
@@ -56,6 +56,10 @@
element="column"
outlet="torque.om.fieldDefinition"/>
</mergepoint>
+ <mergepoint name="newModifiedFields">
+ <action xsi:type="applyAction"
+ outlet="torque.om.dbObject.base.newModifiedFields"/>
+ </mergepoint>
<mergepoint name="fieldDefinitionsReferencedObjects">
<action xsi:type="traverseAllAction"
element="foreign-key/local-field"
@@ -71,6 +75,10 @@
element="column"
outlet="torque.om.getterSetter"/>
</mergepoint>
+ <mergepoint name="newModifiedMethods">
+ <action xsi:type="applyAction"
+ outlet="torque.om.dbObject.base.newModifiedMethods"/>
+ </mergepoint>
<mergepoint name="gettersSettersReferencedObjects">
<action xsi:type="traverseAllAction"
element="foreign-key/local-field"
@@ -114,6 +122,10 @@
<action xsi:type="applyAction"
outlet="torque.om.dbObject.base.objectBeanMethods"/>
</mergepoint>
+ <mergepoint name="equalsHashCode">
+ <action xsi:type="applyAction"
+ outlet="torque.om.dbObject.base.equalsHashCode"/>
+ </mergepoint>
<mergepoint name="toString">
<action xsi:type="applyAction"
outlet="torque.om.dbObject.base.toString"/>
@@ -131,6 +143,11 @@
path="dbObject/base/classJavadoc.vm">
</outlet>
+ <outlet name="torque.om.dbObject.base.newModifiedFields"
+ xsi:type="velocityOutlet"
+ path="dbObject/base/newModifiedFields.vm">
+ </outlet>
+
<outlet name="torque.om.dbObject.base.getterSetterReferencedObject"
xsi:type="velocityOutlet"
path="general/getterSetter.vm">
@@ -146,6 +163,11 @@
</mergepoint>
</outlet>
+ <outlet name="torque.om.dbObject.base.newModifiedMethods"
+ xsi:type="velocityOutlet"
+ path="dbObject/base/newModifiedMethods.vm">
+ </outlet>
+
<outlet name="torque.om.dbObject.base.getterReferencedObject"
xsi:type="velocityOutlet"
path="dbObject/base/getterReferencedObject.vm">
@@ -242,6 +264,11 @@
path="dbObject/base/bean/objectBeanMethods.vm">
</outlet>
+ <outlet name="torque.om.dbObject.base.equalsHashCode"
+ xsi:type="velocityOutlet"
+ path="dbObject/base/equalsHashCode.vm">
+ </outlet>
+
<outlet name="torque.om.dbObject.base.toString"
xsi:type="velocityOutlet"
path="dbObject/base/toString.vm">
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm?rev=1152582&r1=1152581&r2=1152582&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/baseDbObject.vm
Sun Jul 31 13:59:17 2011
@@ -48,6 +48,10 @@ import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.om.StringKey;
import org.apache.torque.om.BooleanKey;
+import org.apache.torque.om.Persistent;
+#if ($torqueGen.booleanOption("torque.om.addGetByNameMethods"))
+import org.apache.torque.om.ColumnAccessByName;
+#end##
import org.apache.torque.util.Criteria;
import org.apache.torque.util.Transaction;
import org.apache.commons.lang.ObjectUtils;
@@ -77,15 +81,18 @@ $torqueGen.mergepoint("classJavadoc")
#set ($extendsBaseClass = "extends $baseClass" )
#end
public abstract class $baseDbObjectClassName $extendsBaseClass
-#if ($torqueGen.booleanOption("torque.om.addIntakeRetrievable"))
- implements $torqueGen.option("torque.om.retrievableInterface")
-#end
+ implements Persistent##
+#if ($torqueGen.booleanOption("torque.om.addIntakeRetrievable")),
$torqueGen.option("torque.om.retrievableInterface")#end##
+#if ($torqueGen.booleanOption("torque.om.addGetByNameMethods")),
ColumnAccessByName#end##
+
{
$torqueGen.mergepoint("serialVersionUid")
## field definitions for columns
$torqueGen.mergepoint("fieldDefinitions")
+$torqueGen.mergepoint("newModifiedFields")
+
## field definitions for referenced objects
#if ($torqueGen.booleanOption("torque.om.complexObjectModel"))
$torqueGen.mergepoint("fieldDefinitionsReferencedObjects")
@@ -99,6 +106,8 @@ $torqueGen.mergepoint("fieldDefinitionsR
## getters and setters for member variables for columns
$torqueGen.mergepoint("gettersSetters")
+$torqueGen.mergepoint("newModifiedMethods")
+
#if ($torqueGen.option("torque.om.complexObjectModel"))
$torqueGen.mergepoint("gettersSettersReferencedObjects")
#end
@@ -126,5 +135,6 @@ $torqueGen.mergepoint("objectBeanMethods
#end
$torqueGen.mergepoint("toString")
+$torqueGen.mergepoint("equalsHashCode")
$torqueGen.mergepoint("extensions")
}
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/equalsHashCode.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/equalsHashCode.vm?rev=1152582&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/equalsHashCode.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/equalsHashCode.vm
Sun Jul 31 13:59:17 2011
@@ -0,0 +1,71 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you 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.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## Creates the equals and hashCode methods.
+## This template expects as input a "table" element from the torque schema.
+##
+ /**
+ * Compares the primary key of this instance with the key of another.
+ *
+ * @param toCompare The object to compare to.
+ * @return Whether the primary keys are equal and the object have the
+ * same class.
+ */
+ public boolean equals(Object toCompare)
+ {
+ if (toCompare == null)
+ {
+ return false;
+ }
+ if (this == toCompare)
+ {
+ return true;
+ }
+ if (!getClass().equals(toCompare.getClass()))
+ {
+ return false;
+ }
+ Persistent persistent = (Persistent) toCompare;
+ if (getPrimaryKey() == null || persistent.getPrimaryKey() == null)
+ {
+ return false;
+ }
+ return getPrimaryKey().equals(persistent.getPrimaryKey());
+ }
+
+ /**
+ * If the primary key is not <code>null</code>, return the hashcode of the
+ * primary key. Otherwise calls <code>Object.hashCode()</code>.
+ *
+ * @return an <code>int</code> value
+ */
+ public int hashCode()
+ {
+ ObjectKey ok = getPrimaryKey();
+ if (ok == null)
+ {
+ return super.hashCode();
+ }
+
+ return ok.hashCode();
+ }
+
+
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm?rev=1152582&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedFields.vm
Sun Jul 31 13:59:17 2011
@@ -0,0 +1,32 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you 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.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## Creates the isNew and modified fields.
+## This template expects as input a "table" element from the torque schema.
+##
+ /** Whether this object was modified after loading or after last save. */
+ private boolean modified = true;
+
+ /**
+ * Whether this object was loaded from the database or already saved
+ * (false) or whether it is not yet in the database(true).
+ */
+ private boolean isNew = true;
Added:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm?rev=1152582&view=auto
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
(added)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/newModifiedMethods.vm
Sun Jul 31 13:59:17 2011
@@ -0,0 +1,75 @@
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements. See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership. The ASF licenses this file
+## to you 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.
+##
+######
+##
+## version $Id: MultiExtendBean.vm 240328 2005-08-26 22:02:48 +0200 (Fr, 26
Aug 2005) tfischer $
+##
+## Creates the getters and setters for the isNew and modified fields.
+## This template expects as input a "table" element from the torque schema.
+##
+ /**
+ * Returns whether the object has ever been saved. This will
+ * be false, if the object was retrieved from storage or was created
+ * and then saved.
+ *
+ * @return true, if the object has never been persisted.
+ */
+ public boolean isNew()
+ {
+ return isNew;
+ }
+
+ /**
+ * Sets whether the object has ever been saved.
+ *
+ * @param isNew true if the object has never been saved, false otherwise.
+ */
+ public void setNew(boolean isNew)
+ {
+ this.isNew = isNew;
+ }
+
+ /**
+ * Returns whether the object has been modified.
+ *
+ * @return True if the object has been modified.
+ */
+ public boolean isModified()
+ {
+ return modified;
+ }
+
+ /**
+ * Sets whether the object has been modified.
+ *
+ * @param modified true if the object has been modified, false otherwise.
+ */
+ public void setModified(boolean modified)
+ {
+ this.modified = modified;
+ }
+
+ /**
+ * Sets the modified state for the object to be false.
+ */
+ public void resetModified()
+ {
+ modified = false;
+ }
+
+
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm?rev=1152582&r1=1152581&r2=1152582&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/om/templates/dbObject/base/primaryKeyMethods.vm
Sun Jul 31 13:59:17 2011
@@ -197,6 +197,33 @@
{
setPrimaryKey(new ComboKey(key));
}
+#else
+
+ /**
+ * Set the PrimaryKey with an ObjectKey
+ *
+ * @param key the primary key to set.
+ *
+ * @throws NoSuchOperationException always.
+ */
+ public void setPrimaryKey(ObjectKey key) throws TorqueException
+ {
+ throw new UnsupportedOperationException(
+ "This table has no primary key");
+ }
+
+ /**
+ * Set the PrimaryKey using a String.
+ *
+ * @param key the primary key to set.
+ *
+ * @throws NoSuchOperationException always.
+ */
+ public void setPrimaryKey(String key) throws TorqueException
+ {
+ throw new UnsupportedOperationException(
+ "This table has no primary key");
+ }
#end
/**
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=1152582&r1=1152581&r2=1152582&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
Sun Jul 31 13:59:17 2011
@@ -221,7 +221,7 @@ public class OMByNameMethodsTest extends
{
// Testing SetByName method for Object Types
- BaseObject objectTypes = new TypesObject();
+ ColumnAccessByName objectTypes = new TypesObject();
try
{
for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
@@ -334,7 +334,7 @@ public class OMByNameMethodsTest extends
OBJECT_TEST_VALUES[iValue++].equals(((TypesObject) objectTypes)
.getODouble()));
// Test Primitive Types
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
try
{
for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
@@ -395,7 +395,7 @@ public class OMByNameMethodsTest extends
public void testGetByNameMethod() throws Exception
{
// Testing GetByName method for Object Types
- BaseObject objectTypes = new TypesObject();
+ ColumnAccessByName objectTypes = new TypesObject();
try
{
for (int i = 0; i < OBJECT_COLUMN_NAMES.length; i++)
@@ -419,7 +419,7 @@ public class OMByNameMethodsTest extends
}
// Test Primative Types
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
try
{
for (int i = 0; i < PRIMITIVE_COLUMN_NAMES.length; i++)
@@ -451,7 +451,7 @@ public class OMByNameMethodsTest extends
public void testSetByPeerNameMethod() throws Exception
{
// Testing GetByName method for Object Types
- BaseObject objectTypes = new TypesObject();
+ ColumnAccessByName objectTypes = new TypesObject();
try
{
for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
@@ -477,7 +477,7 @@ public class OMByNameMethodsTest extends
}
// Test Primitive Types
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
try
{
for (int i = 0; i < PRIMITIVE_PEER_NAMES.length; i++)
@@ -511,7 +511,7 @@ public class OMByNameMethodsTest extends
public void testSetByPositionMethod() throws Exception
{
// Testing GetByName method for Object Types
- BaseObject objectTypes = new TypesObject();
+ ColumnAccessByName objectTypes = new TypesObject();
try
{
for (int i = 0; i < OBJECT_PEER_NAMES.length; i++)
@@ -537,7 +537,7 @@ public class OMByNameMethodsTest extends
}
// Test Primitive Types
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
try
{
for (int i = 0; i < PRIMITIVE_PEER_NAMES.length; i++)
@@ -570,8 +570,8 @@ public class OMByNameMethodsTest extends
*/
public void testInvalidObjectErrors() throws Exception
{
- BaseObject objectTypes = new TypesObject();
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName objectTypes = new TypesObject();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
// Test catching invalid object types
boolean error = false;
try
@@ -605,7 +605,7 @@ public class OMByNameMethodsTest extends
*/
public void testInvalidNameErrors() throws Exception
{
- BaseObject objectTypes = new TypesObject();
+ ColumnAccessByName objectTypes = new TypesObject();
// Test that false status is returned for invalid column names.
boolean status = objectTypes.setByName("xxxOBit", new Integer(1));
assertFalse("Did not get a false status from setByName with "
@@ -625,8 +625,8 @@ public class OMByNameMethodsTest extends
*/
public void testNullHandling() throws Exception
{
- BaseObject objectTypes = new TypesObject();
- BaseObject primitiveTypes = new TypesPrimitive();
+ ColumnAccessByName objectTypes = new TypesObject();
+ ColumnAccessByName primitiveTypes = new TypesPrimitive();
// Object type fields should allow nulls
boolean error = false;
try
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]