You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-commits@db.apache.org by mc...@apache.org on 2007/12/03 19:25:22 UTC
svn commit: r600623 - in /db/jdo/trunk/tck2: ./ src/conf/
src/java/org/apache/jdo/tck/api/persistencemanager/
src/java/org/apache/jdo/tck/pc/newInstance/
src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/
src/jdo/datastoreidentity/org/apach...
Author: mcaisse
Date: Mon Dec 3 10:25:12 2007
New Revision: 600623
URL: http://svn.apache.org/viewvc?rev=600623&view=rev
Log:
JDO-453 complete
Added:
db/jdo/trunk/tck2/src/conf/newInstanceBadMapping.conf
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java (with props)
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java (with props)
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java (with props)
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java (with props)
db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (with props)
db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (with props)
db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (with props)
db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (with props)
db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (with props)
db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (with props)
db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm (with props)
db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm (with props)
Modified:
db/jdo/trunk/tck2/project.properties
db/jdo/trunk/tck2/src/conf/configurations.list
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstance.java
db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
Modified: db/jdo/trunk/tck2/project.properties
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/project.properties?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/project.properties (original)
+++ db/jdo/trunk/tck2/project.properties Mon Dec 3 10:25:12 2007
@@ -231,6 +231,9 @@
org/apache/jdo/tck/pc/newInstance/Address.java \
org/apache/jdo/tck/pc/newInstance/AAddress.java \
org/apache/jdo/tck/pc/newInstance/IAddress.java \
+ org/apache/jdo/tck/pc/newInstance/Address_bad.java \
+ org/apache/jdo/tck/pc/newInstance/AAddress_bad.java \
+ org/apache/jdo/tck/pc/newInstance/IAddress_bad.java \
org/apache/jdo/tck/pc/order/Order.java \
org/apache/jdo/tck/pc/order/OrderItem.java \
org/apache/jdo/tck/pc/fieldtypes/AllTypes.java \
@@ -457,6 +460,9 @@
org/apache/jdo/tck/pc/newInstance/Address.class \
org/apache/jdo/tck/pc/newInstance/AAddress.class \
org/apache/jdo/tck/pc/newInstance/IAddress.class \
+ org/apache/jdo/tck/pc/newInstance/Address_bad.class \
+ org/apache/jdo/tck/pc/newInstance/AAddress_bad.class \
+ org/apache/jdo/tck/pc/newInstance/IAddress_bad.class \
org/apache/jdo/tck/pc/order/Order.class \
org/apache/jdo/tck/pc/order/OrderItem.class \
org/apache/jdo/tck/pc/fieldtypes/AllTypes.class \
@@ -643,6 +649,9 @@
org/apache/jdo/tck/pc/newInstance/Address.jdo \
org/apache/jdo/tck/pc/newInstance/AAddress.jdo \
org/apache/jdo/tck/pc/newInstance/IAddress.jdo \
+ org/apache/jdo/tck/pc/newInstance/Address_bad.jdo \
+ org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo \
+ org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo \
org/apache/jdo/tck/pc/query/package.jdo \
org/apache/jdo/tck/pc/singlefieldidentity/package.jdo \
org/apache/jdo/tck/pc/shoppingcart/package.jdo \
Modified: db/jdo/trunk/tck2/src/conf/configurations.list
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/configurations.list?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/conf/configurations.list (original)
+++ db/jdo/trunk/tck2/src/conf/configurations.list Mon Dec 3 10:25:12 2007
@@ -18,6 +18,7 @@
instancecallbacks.conf \
jdohelper.conf \
pm.conf \
+ newInstanceBadMapping.conf \
pmf.conf \
detach.conf \
enhancement.conf \
Added: db/jdo/trunk/tck2/src/conf/newInstanceBadMapping.conf
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/conf/newInstanceBadMapping.conf?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/conf/newInstanceBadMapping.conf (added)
+++ db/jdo/trunk/tck2/src/conf/newInstanceBadMapping.conf Mon Dec 3 10:25:12 2007
@@ -0,0 +1,24 @@
+# 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.
+
+jdo.tck.description = All pm tests with standard mapping, no testdata.
+jdo.tck.mapping.companyfactory =
+jdo.tck.testdata =
+jdo.tck.standarddata =
+jdo.tck.mapping = 1
+jdo.tck.requiredOptions =
+jdo.tck.classes = \
+org.apache.jdo.tck.api.persistencemanager.NewInstanceBadMapping
+
Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstance.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstance.java?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstance.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstance.java Mon Dec 3 10:25:12 2007
@@ -23,6 +23,9 @@
import org.apache.jdo.tck.pc.newInstance.AAddress;
import org.apache.jdo.tck.pc.newInstance.Address;
import org.apache.jdo.tck.pc.newInstance.IAddress;
+import org.apache.jdo.tck.pc.newInstance.AAddress_bad;
+import org.apache.jdo.tck.pc.newInstance.Address_bad;
+import org.apache.jdo.tck.pc.newInstance.IAddress_bad;
import org.apache.jdo.tck.util.BatchTestRunner;
/**
@@ -55,68 +58,84 @@
BatchTestRunner.run(NewInstance.class);
}
- /** */
- public void testNewInstance() {
+ /** test newInstance (Class pcInterface) */
+ public void testNewInstanceInterface() {
pm = getPM();
+ try {
+ pm.newInstance(IAddress.class);
+ } catch (Exception e) {
+ fail("Unexpected exception thrown. "
+ + e.getMessage());
+ }
+ }
- /* positive tests */
- runTestNewInstanceInterface(pm);
- runTestNewInstanceAbstractClass(pm);
- runTestNewInstanceClass(pm);
-
- /* negative tests */
+ /** test newInstance (Class pcAbstractClass) */
+ public void testNewInstanceAbstractClass() {
+ pm = getPM();
+ try {
+ pm.newInstance(AAddress.class);
+ } catch (Exception e) {
+ fail("Unexpected exception thrown. "
+ + e.getMessage());
+ }
+ }
- pm.close();
- pm = null;
+ /** test newInstance (Class pcClass) */
+ public void testNewInstanceClass() {
+ pm = getPM();
+ try {
+ pm.newInstance(Address.class);
+ } catch (Exception e) {
+ fail("Unexpected exception thrown. "
+ + e.getMessage());
+ }
}
/** test newInstance (Class pcInterface) */
- private void runTestNewInstanceInterface(PersistenceManager pm) {
- IAddress iaddress = (IAddress)pm.newInstance(IAddress.class);
-// Transaction tx = pm.currentTransaction();
-// try {
-// tx = pm.currentTransaction();
-// tx.begin();
-// tx.commit();
- if (debug) logger.debug(" \nPASSED in testNewInstance()");
-// }
-// finally {
-// if (tx.isActive())
-// tx.rollback();
-// }
+ public void testNewInstanceInterfaceBad() {
+ pm = getPM();
+ try {
+ pm.newInstance(IAddress_bad.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Interface contains method "
+ + "not declared as persistent property.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException but " + e.getMessage()
+ + " thrown instead.");
+ }
}
/** test newInstance (Class pcAbstractClass) */
- private void runTestNewInstanceAbstractClass(PersistenceManager pm) {
- pm.newInstance(AAddress.class);
- Transaction tx = pm.currentTransaction();
- // try {
- // tx.begin();
-//
-//
-// tx.commit();
-// if (debug) logger.debug(" \nPASSED in testNewInstance()");
-// }
-// finally {
-// if (tx.isActive())
-// tx.rollback();
-// }
- }
-
- /** test newInstance (Class pcClass) */
- private void runTestNewInstanceClass(PersistenceManager pm) {
- pm.newInstance(Address.class);
- Transaction tx = pm.currentTransaction();
-// try {
-// tx.begin();
-//
-// tx.commit();
-// if (debug) logger.debug(" \nPASSED in testNewInstance()");
-// }
-// finally {
-// if (tx.isActive())
-// tx.rollback();
-// }
+ public void testNewInstanceAbstractClassBad() {
+ pm = getPM();
+ try {
+ pm.newInstance(AAddress_bad.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Abstract class contains abstract method "
+ + "not declared as persistent property.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException but " + e.getMessage()
+ + "t hrown instead.");
+ }
+ }
+
+ /** test newInstance (Class pcClass) */
+ public void testNewInstanceClassBad() {
+ pm = getPM();
+ try {
+ pm.newInstance(Address_bad.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Class contains non-public no-args constructor.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException but " + e.getMessage()
+ + " thrown instead.");
+ }
}
}
Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java Mon Dec 3 10:25:12 2007
@@ -0,0 +1,106 @@
+/*
+ * 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.
+ */
+
+
+package org.apache.jdo.tck.api.persistencemanager;
+
+import javax.jdo.PersistenceManager;
+import javax.jdo.Transaction;
+import org.apache.jdo.tck.pc.newInstance.AAddress;
+import org.apache.jdo.tck.pc.newInstance.Address;
+import org.apache.jdo.tck.pc.newInstance.IAddress;
+import org.apache.jdo.tck.util.BatchTestRunner;
+
+/**
+ *<B>Title:</B> Delete Persistent
+ *<BR>
+ *<B>Keywords:</B>
+ *<BR>
+ *<B>Assertion IDs:</B> A12.6.6-1
+ *<BR>
+ *<B>Assertion Description: </B>
+[The parameter must be one of the following:
+- an abstract class that is declared in the metadata as persistence-capable, in which all abstract methods are declared as persistent properties, or
+- an interface that is declared in the metadata as persistence-capable, in which all methods are declared as persistent properties, or
+- a concrete class that is declared in the metadata as persistence-capable. In this case, the concrete class must declare a public no-args constructor.
+If the parameter does not satisfy the above requirements, JDOUserException is thrown.
+ *
+ *This test is intended to be run only with mapping 1, which fails to map
+ *a persistent field.
+ */
+
+public class NewInstanceBadMapping extends PersistenceManagerTest {
+
+ /** */
+ private static final String ASSERTION_FAILED =
+ "Assertion A12.5.7-9 (NewInstance) failed: ";
+
+ /**
+ * The <code>main</code> is called when the class
+ * is directly executed from the command line.
+ * @param args The arguments passed to the program.
+ */
+ public static void main(String[] args) {
+ BatchTestRunner.run(NewInstance.class);
+ }
+
+ /** test newInstance (Class pcInterface) */
+ public void testNewInstanceInterface() {
+ pm = getPM();
+ try {
+ IAddress iaddress = (IAddress)pm.newInstance(IAddress.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Persistent property is not mapped.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException for unmapped persistent property, "
+ + "but " + e.getMessage() + " thrown instead.");
+ }
+ }
+
+ /** test newInstance (Class pcAbstractClass) */
+ public void testNewInstanceAbstractClass() {
+ pm = getPM();
+ try {
+ pm.newInstance(AAddress.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Persistent property is not mapped.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException for unmapped persistent property, "
+ + "but " + e.getMessage() + " thrown instead.");
+ }
+ }
+
+ /** test newInstance (Class pcClass) */
+ public void testNewInstanceClass() {
+ pm = getPM();
+ try {
+ pm.newInstance(Address.class);
+ fail("Expected JDOUserException but no exception thrown. "
+ + "Persistent property is not mapped.");
+ } catch (javax.jdo.JDOUserException jdoe) {
+ // Expected exception
+ } catch (Exception e) {
+ fail("Expected JDOUserException for unmapped persistent property, "
+ + "but " + e.getMessage() + " thrown instead.");
+ }
+ }
+
+}
Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/NewInstanceBadMapping.java
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java (original)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/api/persistencemanager/PersistenceManagerTest.java Mon Dec 3 10:25:12 2007
@@ -46,9 +46,9 @@
addTearDownClass(PCPoint.class);
addTearDownClass(Department.class);
addTearDownClass(Company.class);
- addTearDownClass(Address.class);
- addTearDownClass(AAddress.class);
- addTearDownClass(IAddress.class);
+// addTearDownClass(Address.class);
+// addTearDownClass(AAddress.class);
+// addTearDownClass(IAddress.class);
}
/** */
Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java Mon Dec 3 10:25:12 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package org.apache.jdo.tck.pc.newInstance;
+
+/**
+ * This interface represents the persistent state of Address.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+public abstract class AAddress_bad implements IAddress {
+
+ public abstract long getAddrid();
+ public abstract String getStreet();
+ public abstract String getCity();
+ public abstract String getState();
+ public abstract String getZipcode();
+ public abstract String getCountry();
+
+ // Not declared as a persistent property => JDOUserException on
+ // pm.newInstance(this)
+ public abstract String getAString();
+
+ public abstract void setAddrid(long addrid);
+ public abstract void setStreet(String street);
+ public abstract void setCity(String city);
+ public abstract void setState(String state);
+ public abstract void setZipcode(String zipcode);
+ public abstract void setCountry(String country);
+}
Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/AAddress_bad.java
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java Mon Dec 3 10:25:12 2007
@@ -0,0 +1,339 @@
+/*
+ * 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.
+ */
+
+package org.apache.jdo.tck.pc.newInstance;
+
+import java.io.Serializable;
+
+
+/**
+ * This class represents a postal address.
+ */
+public class Address_bad
+ implements IAddress
+{
+
+ private long addrid;
+ private String street;
+ private String city;
+ private String state;
+ private String zipcode;
+ private String country;
+
+ // pm.newInstance(this) throws JDOUserException with non-public constructor
+ private Address_bad() {}
+
+ /**
+ * This constructor initializes the <code>Address</code> components.
+ * @param addrid The address ID.
+ * @param street The street address.
+ * @param city The city.
+ * @param state The state.
+ * @param zipcode The zip code.
+ * @param country The zip country.
+ */
+ public Address_bad(long addrid, String street, String city,
+ String state, String zipcode, String country)
+ {
+ this.addrid = addrid;
+ this.street = street;
+ this.city = city;
+ this.state = state;
+ this.zipcode = zipcode;
+ this.country = country;
+ }
+
+ public String getAString() {
+ return "A String";
+ }
+
+ /**
+ * Get the addrid associated with this object.
+ * @return the addrid.
+ */
+ public long getAddrid() {
+ return addrid;
+ }
+
+ /**
+ * Set the id associated with this object.
+ * @param id the id.
+ */
+ public void setAddrid(long id) {
+ if (this.addrid != 0)
+ throw new IllegalStateException("Id is already set.");
+ this.addrid = id;
+ }
+
+ /**
+ * Get the street component of the address.
+ * @return The street component of the address.
+ */
+ public String getStreet() {
+ return street;
+ }
+
+ /**
+ * Set the street component of the address.
+ * @param street The street component.
+ */
+ public void setStreet(String street) {
+ this.street = street;
+ }
+
+ /**
+ * Get the city.
+ * @return The city component of the address.
+ */
+ public String getCity() {
+ return city;
+ }
+
+ /**
+ * Set the city component of the address.
+ * @param city The city.
+ */
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ /**
+ * Get the state component of the address.
+ * @return The state.
+ */
+ public String getState() {
+ return state;
+ }
+
+ /**
+ * Set the state component of the address.
+ * @param state The state.
+ */
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ /**
+ * Get the zipcode component of the address.
+ * @return The zipcode.
+ */
+ public String getZipcode() {
+ return zipcode;
+ }
+
+ /**
+ * Set the zip code component of the address.
+ * @param zipcode The zipcode.
+ */
+ public void setZipcode(String zipcode) {
+ this.zipcode = zipcode;
+ }
+
+ /**
+ * Get the country component of the address.
+ * @return The country.
+ */
+ public String getCountry() {
+ return country;
+ }
+
+ /**
+ * Set the country component of the address.
+ * @param country The country.
+ */
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ /**
+ * Returns a String representation of a <code>Address</code> object.
+ * @return a String representation of a <code>Address</code> object.
+ */
+ public String toString() {
+ return "Address(" + getFieldRepr() + ")";
+ }
+
+ /**
+ * Returns a String representation of the non-relationship fields.
+ * @return a String representation of the non-relationship fields.
+ */
+ protected String getFieldRepr() {
+ StringBuffer rc = new StringBuffer();
+ rc.append(addrid);
+ rc.append(", street ").append(street);
+ rc.append(", city ").append(city);
+ rc.append(", state ").append(state);
+ rc.append(", zipcode ").append(zipcode);
+ rc.append(", country ").append(country);
+ return rc.toString();
+ }
+
+// /**
+// * Returns <code>true</code> if all the fields of this instance are
+// * deep equal to the coresponding fields of the specified Person.
+// * @param other the object with which to compare.
+// * @param helper EqualityHelper to keep track of instances that have
+// * already been processed.
+// * @return <code>true</code> if all the fields are deep equal;
+// * <code>false</code> otherwise.
+// * @throws ClassCastException if the specified instances' type prevents
+// * it from being compared to this instance.
+// */
+// public boolean deepCompareFields(Object other,
+// EqualityHelper helper) {
+// IAddress otherAddress = (IAddress)other;
+// String where = "Address<" + addrid + ">";
+// return
+// helper.equals(addrid, otherAddress.getAddrid(), where + ".addrid") &
+// helper.equals(street, otherAddress.getStreet(), where + ".street") &
+// helper.equals(city, otherAddress.getCity(), where + ".city") &
+// helper.equals(state, otherAddress.getState(), where + ".state") &
+// helper.equals(zipcode, otherAddress.getZipcode(), where + ".zipcode") &
+// helper.equals(country, otherAddress.getCountry(), where + ".country");
+// }
+//
+// /**
+// * Compares this object with the specified object for order. Returns a
+// * negative integer, zero, or a positive integer as this object is less
+// * than, equal to, or greater than the specified object.
+// * @param o The Object to be compared.
+// * @return a negative integer, zero, or a positive integer as this
+// * object is less than, equal to, or greater than the specified object.
+// * @throws ClassCastException - if the specified object's type prevents
+// * it from being compared to this Object.
+// */
+// public int compareTo(Object o) {
+// return compareTo((IAddress)o);
+// }
+//
+// /**
+// * Compare two instances. This is a method in Comparator.
+// */
+// public int compare(Object o1, Object o2) {
+// return compare((IAddress)o1, (IAddress)o2);
+// }
+//
+// /**
+// * Compares this object with the specified Address object for
+// * order. Returns a negative integer, zero, or a positive integer as
+// * this object is less than, equal to, or greater than the specified
+// * object.
+// * @param other The Address object to be compared.
+// * @return a negative integer, zero, or a positive integer as this
+// * object is less than, equal to, or greater than the specified Address
+// * object.
+// */
+// public int compareTo(IAddress other) {
+// return compare(this, other);
+// }
+//
+// /**
+// * Compares its two IAddress arguments for order. Returns a negative
+// * integer, zero, or a positive integer as the first argument is less
+// * than, equal to, or greater than the second.
+// * @param o1 the first IAddress object to be compared.
+// * @param o2 the second IAddress object to be compared.
+// * @return a negative integer, zero, or a positive integer as the first
+// * object is less than, equal to, or greater than the second object.
+// */
+// public static int compare(IAddress o1, IAddress o2) {
+// return EqualityHelper.compare(o1.getAddrid(), o2.getAddrid());
+// }
+//
+// /**
+// * Indicates whether some other object is "equal to" this one.
+// * @param obj the object with which to compare.
+// * @return <code>true</code> if this object is the same as the obj
+// * argument; <code>false</code> otherwise.
+// */
+// public boolean equals(Object obj) {
+// if (obj instanceof IAddress) {
+// return compareTo((IAddress)obj) == 0;
+// }
+// return false;
+// }
+
+ /**
+ * Returns a hash code value for the object.
+ * @return a hash code value for this object.
+ */
+ public int hashCode() {
+ return (int)addrid;
+ }
+
+ /**
+ * This class is used to represent the application identifier
+ * for the <code>Address</code> class.
+ */
+ public static class Oid implements Serializable, Comparable {
+
+ /**
+ * This is the identifier field for <code>Address</code> and must
+ * correspond in type and name to the field in
+ * <code>Address</code>.
+ */
+ public long addrid;
+
+ /** The required public, no-arg constructor. */
+ public Oid()
+ {
+ addrid = 0;
+ }
+
+ /**
+ * A constructor to initialize the identifier field.
+ * @param addrid the id of the Address.
+ */
+ public Oid(long addrid) {
+ this.addrid = addrid;
+ }
+
+ public Oid(String s) { addrid = Long.parseLong(justTheId(s)); }
+
+ public String toString() { return this.getClass().getName() + ": " + addrid;}
+
+
+ /** */
+ public boolean equals(java.lang.Object obj) {
+ if( obj==null || !this.getClass().equals(obj.getClass()) )
+ return( false );
+ Oid o = (Oid) obj;
+ if( this.addrid != o.addrid ) return( false );
+ return( true );
+ }
+
+ /** */
+ public int hashCode() {
+ return( (int) addrid );
+ }
+
+ protected static String justTheId(String str) {
+ return str.substring(str.indexOf(':') + 1);
+ }
+
+ /** */
+ public int compareTo(Object obj) {
+ // may throw ClassCastException which the user must handle
+ Oid other = (Oid) obj;
+ if( addrid < other.addrid ) return -1;
+ if( addrid > other.addrid ) return 1;
+ return 0;
+ }
+
+ }
+
+}
Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/Address_bad.java
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java (added)
+++ db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java Mon Dec 3 10:25:12 2007
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ */
+
+package org.apache.jdo.tck.pc.newInstance;
+
+/**
+ * This interface represents the persistent state of Address.
+ * Javadoc was deliberately omitted because it would distract from
+ * the purpose of the interface.
+ */
+public interface IAddress_bad {
+
+ long getAddrid();
+ String getStreet();
+ String getCity();
+ String getState();
+ String getZipcode();
+ String getCountry();
+
+ // Not declared as a persistent property => JDOUserException on
+ // pm.newInstance(this)
+ String getAString();
+
+ void setAddrid(long addrid);
+ void setStreet(String street);
+ void setCity(String city);
+ void setState(String state);
+ void setZipcode(String zipcode);
+ void setCountry(String country);
+}
Propchange: db/jdo/trunk/tck2/src/java/org/apache/jdo/tck/pc/newInstance/IAddress_bad.java
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="AAddress_bad" persistence-modifier="persistence-capable"
+ identity-type="application"
+ objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+ <property name="addrid" persistence-modifier="persistent"
+ primary-key="true"/>
+ <property name="street" persistence-modifier="persistent"/>
+ <property name="city" persistence-modifier="persistent"/>
+ <property name="state" persistence-modifier="persistent"/>
+ <property name="zipcode" persistence-modifier="persistent"/>
+ <property name="country" persistence-modifier="persistent"/>
+ </class>
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="Address_bad"
+ identity-type="application"
+ objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+ <field name="addrid" primary-key="true"/>
+ </class>
+
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <interface name="IAddress_bad"
+ identity-type="application"
+ objectid-class="org.apache.jdo.tck.pc.newInstance.Address$Oid">
+ <property name="addrid" persistence-modifier="persistent"
+ primary-key="true"/>
+ <property name="street" persistence-modifier="persistent"/>
+ <property name="city" persistence-modifier="persistent"/>
+ <property name="state" persistence-modifier="persistent"/>
+ <property name="zipcode" persistence-modifier="persistent"/>
+ <property name="country" persistence-modifier="persistent"/>
+ </interface>
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/applicationidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="AAddress_bad" persistence-modifier="persistence-capable"
+ identity-type="datastore">
+ <property name="addrid" persistence-modifier="persistent"/>
+ <property name="street" persistence-modifier="persistent"/>
+ <property name="city" persistence-modifier="persistent"/>
+ <property name="state" persistence-modifier="persistent"/>
+ <property name="zipcode" persistence-modifier="persistent"/>
+ <property name="country" persistence-modifier="persistent"/>
+ </class>
+
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/AAddress_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="Address_bad" identity-type="datastore">
+ <field name="addrid" persistence-modifier="persistent"/>
+ <field name="street" persistence-modifier="persistent"/>
+ <field name="city" persistence-modifier="persistent"/>
+ <field name="state" persistence-modifier="persistent"/>
+ <field name="zipcode" persistence-modifier="persistent"/>
+ <field name="country" persistence-modifier="persistent"/>
+ </class>
+
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/Address_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Added: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo (added)
+++ db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo Mon Dec 3 10:25:12 2007
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<jdo xmlns="http://java.sun.com/xml/ns/jdo/jdo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdo
+ http://java.sun.com/xml/ns/jdo/jdo_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has datastore identity.
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <interface name="IAddress_bad" identity-type="datastore">
+ <property name="addrid" persistence-modifier="persistent"/>
+ <property name="street" persistence-modifier="persistent"/>
+ <property name="city" persistence-modifier="persistent"/>
+ <property name="state" persistence-modifier="persistent"/>
+ <property name="zipcode" persistence-modifier="persistent"/>
+ <property name="country" persistence-modifier="persistent"/>
+ </interface>
+
+ </package>
+</jdo>
Propchange: db/jdo/trunk/tck2/src/jdo/datastoreidentity/org/apache/jdo/tck/pc/newInstance/IAddress_bad.jdo
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm (original)
+++ db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm Mon Dec 3 10:25:12 2007
@@ -87,6 +87,69 @@
<column name="COUNTRY" allows-null="true"/>
</property>
</class>
+
+ <class name="Address_bad" table="address">
+ <field name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </field>
+ <field name="street">
+ <column name="STREET" allows-null="true"/>
+ </field>
+ <field name="city">
+ <column name="CITY" allows-null="true"/>
+ </field>
+ <field name="state">
+ <column name="STATE" allows-null="true"/>
+ </field>
+ <field name="zipcode">
+ <column name="ZIPCODE" allows-null="true"/>
+ </field>
+ <field name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </field>
+ </class>
+
+ <interface name="IAddress_bad" table="address">
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="zipcode">
+ <column name="ZIPCODE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </interface>
+
+ <class name="AAddress_bad" table="address">
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="zipcode">
+ <column name="ZIPCODE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </class>
</package>
</orm>
Added: db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm (added)
+++ db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm Mon Dec 3 10:25:12 2007
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<orm xmlns="http://java.sun.com/xml/ns/jdo/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm
+ http://java.sun.com/xml/ns/jdo/orm_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+
+<!--
+This file deliberately fails to map the zipcode field to stimulate
+a JDOUserException on invoking pm.newInstance(Class under test).
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="Address" table="address">
+ <field name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </field>
+ <field name="street">
+ <column name="STREET" allows-null="true"/>
+ </field>
+ <field name="city">
+ <column name="CITY" allows-null="true"/>
+ </field>
+ <field name="state">
+ <column name="STATE" allows-null="true"/>
+ </field>
+ <field name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </field>
+ </class>
+
+ <interface name="IAddress" table="address">
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </interface>
+
+ <class name="AAddress" table="address">
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </class>
+
+ </package>
+</orm>
Propchange: db/jdo/trunk/tck2/src/orm/applicationidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm
------------------------------------------------------------------------------
svn:eol-style = LF
Modified: db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm?rev=600623&r1=600622&r2=600623&view=diff
==============================================================================
--- db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm (original)
+++ db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard.orm Mon Dec 3 10:25:12 2007
@@ -82,5 +82,62 @@
</property>
</class>
+ <class name="Address_bad" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <field name="addrid" column="ADDRID"/>
+ <field name="street" column="STREET"/>
+ <field name="city" column="CITY"/>
+ <field name="state" column="STATE"/>
+ <field name="zipcode" column="ZIPCODE"/>
+ <field name="country" column="COUNTRY"/>
+ </class>
+
+ <interface name="IAddress_bad" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="zipcode">
+ <column name="ZIPCODE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </interface>
+
+ <class name="AAddress_bad" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="zipcode">
+ <column name="ZIPCODE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </class>
+
</package>
</orm>
Added: db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm
URL: http://svn.apache.org/viewvc/db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm?rev=600623&view=auto
==============================================================================
--- db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm (added)
+++ db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm Mon Dec 3 10:25:12 2007
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ 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.
+-->
+<orm xmlns="http://java.sun.com/xml/ns/jdo/orm"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/orm
+ http://java.sun.com/xml/ns/jdo/orm_2_1.xsd">
+<!--
+This file contains the schema information when an implementation
+has application identity.
+-->
+
+<!--
+This file deliberately fails to map the zipcode field to stimulate
+a JDOUserException on invoking pm.newInstance(Class under test).
+-->
+ <package name="org.apache.jdo.tck.pc.newInstance">
+
+ <class name="Address" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <field name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </field>
+ <field name="street">
+ <column name="STREET" allows-null="true"/>
+ </field>
+ <field name="city">
+ <column name="CITY" allows-null="true"/>
+ </field>
+ <field name="state">
+ <column name="STATE" allows-null="true"/>
+ </field>
+ <field name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </field>
+ </class>
+
+ <interface name="IAddress" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </interface>
+
+ <class name="AAddress" table="address">
+ <datastore-identity strategy="identity"
+ column="DATASTORE_IDENTITY"/>
+ <property name="addrid">
+ <column name="ADDRID" allows-null="true"/>
+ </property>
+ <property name="street">
+ <column name="STREET" allows-null="true"/>
+ </property>
+ <property name="city">
+ <column name="CITY" allows-null="true"/>
+ </property>
+ <property name="state">
+ <column name="STATE" allows-null="true"/>
+ </property>
+ <property name="country">
+ <column name="COUNTRY" allows-null="true"/>
+ </property>
+ </class>
+
+ </package>
+</orm>
Propchange: db/jdo/trunk/tck2/src/orm/datastoreidentity/org/apache/jdo/tck/pc/newInstance/package-standard1.orm
------------------------------------------------------------------------------
svn:eol-style = LF