db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r158179 [35/61] - in incubator/jdo/trunk/tck11: ./ assertions/ iut_jars/ test/ test/conf/ test/java/ test/java/org/ test/java/org/apache/ test/java/org/apache/jdo/ test/java/org/apache/jdo/tck/ test/java/org/apache/jdo/tck/api/ test/java/org/apache/jdo/tck/api/instancecallbacks/ test/java/org/apache/jdo/tck/api/jdohelper/ test/java/org/apache/jdo/tck/api/persistencemanager/ test/java/org/apache/jdo/tck/api/persistencemanagerfactory/ test/java/org/apache/jdo/tck/enhancement/ test/java/org/apache/jdo/tck/extents/ test/java/org/apache/jdo/tck/lifecycle/ test/java/org/apache/jdo/tck/lifecycle/nontransactional/ test/java/org/apache/jdo/tck/models/ test/java/org/apache/jdo/tck/models/embedded/ test/java/org/apache/jdo/tck/models/fieldtypes/ test/java/org/apache/jdo/tck/models/inheritance/ test/java/org/apache/jdo/tck/pc/ test/java/org/apache/jdo/tck/pc/company/ test/java/org/apache/jdo/tck/pc/fieldtypes/ test/java/org/apache/jdo/tck/pc/inheritance/ test/java/org/apache/jdo/tck/pc/instancecallbacks/ test/java/org/apache/jdo/tck/pc/lifecycle/ test/java/org/apache/jdo/tck/pc/mylib/ test/java/org/apache/jdo/tck/query/ test/java/org/apache/jdo/tck/query/operators/ test/java/org/apache/jdo/tck/transactions/ test/java/org/apache/jdo/tck/util/ test/jdo/ test/jdo/applicationidentity/ test/jdo/applicationidentity/org/ test/jdo/applicationidentity/org/apache/ test/jdo/applicationidentity/org/apache/jdo/ test/jdo/applicationidentity/org/apache/jdo/tck/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/company/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/fieldtypes/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/inheritance/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/instancecallbacks/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/lifecycle/ test/jdo/applicationidentity/org/apache/jdo/tck/pc/mylib/ test/jdo/datastoreidentity/ test/jdo/datastoreidentity/org/ test/jdo/datastoreidentity/org/apache/ test/jdo/datastoreidentity/org/apache/jdo/ test/jdo/datastoreidentity/org/apache/jdo/tck/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/company/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/fieldtypes/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/inheritance/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/instancecallbacks/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/lifecycle/ test/jdo/datastoreidentity/org/apache/jdo/tck/pc/mylib/
Date Sat, 19 Mar 2005 01:09:51 GMT
Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+import java.io.Serializable;
+
+/** */
+public class AllPersist {
+
+    public int intA;  // not managed
+    public double doubleB;  // persistent
+    public int intB; // persistent
+    
+    private int keyValue;  // persistent--used as key field in application identity
+    private static int nextKeyValue = 1;
+    
+    public int hashCode() {
+        return keyValue;
+    }
+    
+    public boolean equals(Object obj) {
+        if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+        else return keyValue == ((Id)obj).keyValue;
+    }
+    
+    public AllPersist() {
+        intA = -1;
+        doubleB = 2.0;
+        intB = -5;
+    }
+    
+    public AllPersist(int intA, double doubleVal, int intB) {
+        keyValue = nextKeyValue++;
+        this.intA = intA;
+        doubleB = doubleVal;
+        this.intB = intB;
+    }
+    
+    public static class Id implements Serializable {
+        public int keyValue;
+
+        public Id() {
+        }
+    
+        public Id(int keyValue) {
+            this.keyValue = keyValue;
+        }
+    
+        public Id(String s) {
+            try {
+                keyValue = Integer.parseInt(s);}
+            catch(NumberFormatException e){
+                keyValue = 0;
+            }
+        }
+    
+        public boolean equals(Object obj) {
+            if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+            else return keyValue == ((Id)obj).keyValue;
+        }
+    
+        public int hashCode() {
+            return keyValue;
+        }
+    
+        public String toString() {
+            return Integer.toString(keyValue);
+        } 
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist2.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist2.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist2.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist2.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class AllPersist2 extends AllPersist {
+
+    public char charC;  // not managed
+    public boolean booleanD; // not managed
+    public float floatE;  // transactional
+    
+    public AllPersist2() {
+        charC = '3';
+        booleanD = false;
+        floatE = -4.4f;
+    }
+    
+    public AllPersist2 (int intA, double doubleB, int intB, char charC, boolean booleanVal, float floatE) {
+        super(intA, doubleB, intB);
+        this.charC = charC;
+        booleanD = booleanVal;
+        this.floatE = floatE;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist3.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist3.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist3.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist3.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class AllPersist3 extends AllPersist2 {
+
+    public short shortF;  // persistent
+    public AllPersist4 secondObj; // transactional
+    public AllPersist4 thirdObj;  // persistent
+    
+    public AllPersist3() {
+        shortF = 1238;
+    }
+    
+    public AllPersist3 (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE, short shortVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE);
+        shortF = shortVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist4.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist4.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist4.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/AllPersist4.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class AllPersist4 extends AllPersist3 {
+
+    public short shortG;  // not managed
+    public AllPersist4 fourthObj; // not managed
+    public int intH; // persistent
+    
+    public AllPersist4() {
+        shortG = -360;
+        intH = -6;
+    }
+    
+    public AllPersist4 (int intA, double doubleB, int intB, char charC, boolean booleanD,
+       float floatE, short shortF, short shortG, int intVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF);
+        this.shortG = shortG;
+        intH = intVal;
+    }
+    
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/Constants.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/Constants.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/Constants.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/Constants.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/**
+ * @author Michael Bouschen
+ *
+ * Defines constants used by the inheritance pc classes and the inheritance tck 
+ * test cases.   
+ */
+public class Constants 
+{
+    //                                           0        1       2       3      4      5        6      7      8       9     10    11
+	public static final int[] intA_V =        {   -1,    350,      43,    336,  -447,     1,    337,   10,      43,  -447,   20,    30};
+	public static final double[] doubleB_V =  {  2.0,    9.8,    94.5,   -7.2,  -13.,   4.0,   -8.2,  -13,    94.5,   -13,   23,    33};
+	public static final int[] intB_V =        {  -5 ,   3334,     -76,     28, 12497,     5,     38,   14,     -76, 12497,   24,    34};
+	public static final char[] charC_V =      {  '3',    'D',     'J',    'L',   'N',   'w',    '1',  'x',     'J',   'P',  'y',   'z'};
+	public static final boolean[] booleanD_V ={false,   true,    true,   true,  true, false,   true, true,    true,  true, true, false};
+	public static final float[] floatE_V =    {-4.4f, -32.7f,  -21.5f, -3266f, -3.6f,  3.0f, -4266f,  12f,  -21.5f, -3.6f,  22f,   32f};
+	public static final short[] shortF_V =    { 1238,    258,     394,      8,    21,     6,      9,   15,     394,    21,   25,    35};
+	public static final short[] shortG_V =    { -360,  -1000,   -4321,     -6,   -44,     2,     -7,   11,    4321,   -44,   21,    31};
+	public static final int[] intH_V =        {   -6,    -25, -347600,   -603, -7613,     7,   -703,   16, -347600, -7613,   26,    36};
+
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+import java.io.Serializable;
+
+/** */
+public class FieldSameName {
+    int n1;  // not managed
+    double n2;  // persistent
+    int n3; // persistent
+    
+    private int keyValue;  // persistent--used as key field in application identity
+    private static int nextKeyValue = 1;
+    
+    public FieldSameName() {
+        n1 = -1;
+        n2 = 2.0;
+        n3 = -5;
+    }
+    
+    public FieldSameName(int intA, double doubleVal, int intB) {
+        keyValue = nextKeyValue++;
+        n1 = intA;
+        n2 = doubleVal;
+        n3 = intB;
+    }
+    
+    public void setIntA(int intA) {
+        n1 = intA;
+    }
+    
+    public int getIntA() {
+        return n1;
+    }
+
+    public void setDoubleB(double doubleB) {
+        n2 = doubleB;
+    }
+    
+    public double getDoubleB() {
+        return n2;
+    }
+    
+    public void setIntB(int intB) {
+        n3 = intB;
+    }
+    
+    public int getIntB() {
+        return n3;
+    }
+    
+    public static class Id implements Serializable {
+        public int keyValue;
+
+        public Id() {
+        }
+    
+        public Id(int keyValue) {
+            this.keyValue = keyValue;
+        }
+    
+        public Id(String s) {
+            try{ keyValue = Integer.parseInt(s);}
+            catch(NumberFormatException e){
+                keyValue = 0;}
+        }
+    
+        public boolean equals(Object obj) {
+            if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+            else return keyValue == ((Id)obj).keyValue;
+        }
+    
+        public int hashCode() {
+            return keyValue;
+        }
+    
+        public String toString() {
+            return Integer.toString(keyValue);
+        } 
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName2.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName2.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName2.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName2.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class FieldSameName2 extends FieldSameName {
+    char n1;  // not managed
+    boolean n2; // not managed
+    float n3;  // transactional
+    
+    public FieldSameName2() {
+        n1 = '3';
+        n2 = false;
+        n3 = -4.4f;
+    }
+    
+    public FieldSameName2 (int intA, double doubleB, int intB, char charC, boolean booleanVal, float floatE) {
+        super(intA, doubleB, intB);
+        n1 = charC;
+        n2 = booleanVal;
+        n3 = floatE;
+    }
+    
+    public void setCharC(char charC) {
+        n1 = charC;
+    }
+    
+    public char getCharC() {
+        return n1;
+    }
+
+    public void setBooleanD(boolean booleanD) {
+        n2 = booleanD;
+    }
+    
+    public boolean getBooleanD() {
+        return n2;
+    }
+    
+    public void setFloatE(float floatE) {
+        n3 = floatE;
+    }
+    
+    public float getFloatE() {
+        return n3;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName3.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName3.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName3.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName3.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class FieldSameName3 extends FieldSameName2 {
+    short n1;  // persistent
+    FieldSameName4 n2; // transactional
+    FieldSameName4 n3;  // persistent
+    
+    public FieldSameName3() {
+        n1 = 1238;
+    }
+    
+    public FieldSameName3 (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE, short shortVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE);
+        n1 = shortVal;
+    }
+    
+    public void setShortF(short shortF) {
+        n1 = shortF;
+    }
+    
+    public short getShortF() {
+        return n1;
+    }
+
+    public void setSecondObj(FieldSameName4 secondObj) {
+        n2 = secondObj;
+    }
+    
+    public FieldSameName4 getSecondObj() {
+        return n2;
+    }
+    
+    public void setThirdObj(FieldSameName4 thirdObj) {
+        n3 = thirdObj;
+    }
+    
+    public FieldSameName4 getThirdObj() {
+        return n3;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName4.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName4.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName4.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/FieldSameName4.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class FieldSameName4 extends FieldSameName3 {
+    short n1;  // not managed
+    FieldSameName4 n2; // not managed
+    int n3; // persistent
+    
+    public FieldSameName4() {
+        n1 = -360;
+        n3 = -6;
+    }
+    
+    public FieldSameName4 (int intA, double doubleB, int intB, char charC, boolean booleanD,
+       float floatE, short shortF, short shortG, int intVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF);
+        n1 = shortG;
+        n3 = intVal;
+    }
+    
+    public void setShortG(short shortG) {
+        n1 = shortG;
+    }
+    
+    public short getShortG() {
+        return n1;
+    }
+    
+    public void setFourthObj(FieldSameName4 fourthObj) {
+        n2 = fourthObj;
+    }
+    
+    public FieldSameName4 getFourthObj() {
+        return n2;
+    }
+    
+    public void setIntH(int intH) {
+        n3 = intH;
+    }
+    
+    public int getIntH() {
+        return n3;
+    }
+    
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersist.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersist.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersist.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersist.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersist {  // not persistent
+    
+    public int intA;
+
+    public TopNonPersist() {
+        intA = -1;
+    }
+    
+    public TopNonPersist(int intA) {
+        this.intA = intA;
+    }
+
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistB.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistB.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistB.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistB.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+import java.io.Serializable;
+
+/** */
+public class TopNonPersistB extends TopNonPersist {  //  persistent    
+    
+    public double doubleB;  // persistent
+    public int intB; // persistent
+    
+    private int keyValue;  // persistent--used as key field in application identity
+    static private int nextKeyValue = 1;
+    
+    public TopNonPersistB() {
+        doubleB = 2.0;
+        intB = -5;
+    }
+    
+    public TopNonPersistB (int intA, double doubleVal, int intB) {
+        super(intA);
+        keyValue = nextKeyValue++;
+        doubleB = doubleVal;
+        this.intB = intB;
+    }
+    
+    public static class Id implements Serializable {
+        public int keyValue;
+
+        public Id() {
+        }
+    
+        public Id(int keyValue) {
+            this.keyValue = keyValue;
+        }
+    
+        public Id(String s) {
+            try{ keyValue = Integer.parseInt(s);}
+            catch(NumberFormatException e){
+                keyValue = 0;}
+        }
+    
+        public boolean equals(Object obj) {
+            if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+            else return keyValue == ((Id)obj).keyValue;
+        }
+    
+        public int hashCode() {
+            return keyValue;
+        }
+    
+        public String toString() {
+            return Integer.toString(keyValue);
+        } 
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistC.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistC.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistC.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistC.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistC extends TopNonPersistB { // not persistent
+    
+    public char charC;
+    
+    public TopNonPersistC() {
+        charC = '3';
+    }
+    
+    public TopNonPersistC (int intA, double doubleB, int intB, char charC) {
+        super(intA, doubleB, intB);
+        this.charC = charC;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistD.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistD.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistD.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistD.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistD extends TopNonPersistC { // not persistent
+    
+    public boolean booleanD;
+    
+    public TopNonPersistD() {
+        booleanD = false;
+    }
+    
+    public TopNonPersistD (int int1, double doubleB, int intB, char charC, boolean booleanVal) {
+        super(int1, doubleB, intB,charC);
+        booleanD = booleanVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistE.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistE.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistE.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistE.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistE extends TopNonPersistD {  // persistent
+    
+    public float floatE;  // transactional
+    
+    public TopNonPersistE () {
+        floatE = -4.4f;
+    }
+    
+    public TopNonPersistE (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE) {
+        super(intA, doubleB, intB, charC, booleanD);
+        this.floatE = floatE;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistF.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistF.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistF.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistF.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistF extends TopNonPersistE {  // persistent
+
+    public short shortF;  // persistent
+    public TopNonPersistH secondObj; // transactional
+    public TopNonPersistH thirdObj;  // persistent
+    
+    public TopNonPersistF() {
+        shortF = 1238;
+    }
+    
+    public TopNonPersistF (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE, short shortVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE);
+        shortF = shortVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistG.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistG.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistG.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistG.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistG extends TopNonPersistF { // not persistent
+    
+    public short shortG; 
+    public TopNonPersistH fourthObj; 
+    
+    public TopNonPersistG() {
+        shortG = -360;
+    }
+    
+    public TopNonPersistG (int intA, double doubleB, int intB, char charC, boolean booleanD,
+       float floatE, short shortF, short shortG) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF);
+        this.shortG = shortG;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistH.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistH.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistH.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopNonPersistH.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopNonPersistH extends TopNonPersistG { // persistent
+    
+    public int intH; // persistent
+    
+    public TopNonPersistH() {
+        intH = -6;
+    }
+    
+    public TopNonPersistH (int intA, double doubleB, int intB, char charC, boolean booleanD,
+        float floatE, short shortF, short shortG, int intVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF, shortG);
+        intH = intVal;
+    }
+    
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersist.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersist.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersist.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersist.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+import java.io.Serializable;
+
+/** */
+public class TopPersist {  //  persistent  
+
+    public int intA; // not managed
+    public double doubleB;  // persistent
+    public int intB; // persistent
+    
+    private int keyValue;  // persistent--used as key field in application identity
+    static private int nextKeyValue = 1;
+    
+    public TopPersist() {
+        intA = Constants.intA_V[0];
+        doubleB = Constants.doubleB_V[0];
+        intB = Constants.intB_V[0];
+    }
+    
+    public TopPersist (int intA, double doubleVal, int intB) {
+        keyValue = nextKeyValue++;
+        this.intA = intA;
+        doubleB = doubleVal;
+        this.intB = intB;
+    }
+    
+    public static class Id implements Serializable {
+        public int keyValue;
+
+        public Id() {
+        }
+    
+        public Id(int keyValue) {
+            this.keyValue = keyValue;
+        }
+    
+        public Id(String s) {
+            try{ keyValue = Integer.parseInt(s);}
+            catch(NumberFormatException e){
+                keyValue = 0;}
+        }
+    
+        public boolean equals(Object obj) {
+            if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+            else return keyValue == ((Id)obj).keyValue;
+        }
+    
+        public int hashCode() {
+            return keyValue;
+        }
+    
+        public String toString() {
+            return Integer.toString(keyValue);
+        } 
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistC.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistC.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistC.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistC.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistC extends TopPersist { // not persistent
+
+    public char charC;
+    
+    public TopPersistC() {
+        charC = Constants.charC_V[0];
+    }
+    
+    public TopPersistC (int intA, double doubleB, int intB, char charC) {
+        super(intA, doubleB, intB);
+        this.charC = charC;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistD.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistD.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistD.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistD.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistD extends TopPersistC { // not persistent
+
+    public boolean booleanD;
+    
+    public TopPersistD() {
+        booleanD = Constants.booleanD_V[0];
+    }
+    
+    public TopPersistD (int int1, double doubleB, int intB, char charC, boolean booleanVal) {
+        super(int1, doubleB, intB,charC);
+        booleanD = booleanVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistE.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistE.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistE.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistE.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistE extends TopPersistD {  // persistent
+
+    public float floatE;  // transactional
+    
+    public TopPersistE () {
+        floatE = Constants.floatE_V[0];
+    }
+    
+    public TopPersistE (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE) {
+        super(intA, doubleB, intB, charC, booleanD);
+        this.floatE = floatE;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistF.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistF.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistF.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistF.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistF extends TopPersistE {  // persistent
+
+    public short shortF;  // persistent
+    public TopPersistH secondObj; // transactional
+    public TopPersistH thirdObj;  // persistent
+    
+    public TopPersistF() {
+        shortF = Constants.shortF_V[0];
+    }
+    
+    public TopPersistF (int intA, double doubleB, int intB, char charC, boolean booleanD, float floatE, short shortVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE);
+        shortF = shortVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistG.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistG.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistG.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistG.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistG extends TopPersistF { // not persistent
+
+    public short shortG; 
+    public TopPersistH fourthObj; 
+    
+    public TopPersistG() {
+        shortG = Constants.shortG_V[0];
+    }
+    
+    public TopPersistG (int intA, double doubleB, int intB, char charC, boolean booleanD,
+       float floatE, short shortF, short shortG) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF);
+        this.shortG = shortG;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistH.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistH.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistH.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/inheritance/TopPersistH.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.inheritance;
+
+/** */
+public class TopPersistH extends TopPersistG { // persistent
+
+    public int intH; // persistent
+    
+    public TopPersistH() {
+        intH = Constants.intH_V[0];
+    }
+    
+    public TopPersistH (int intA, double doubleB, int intB, char charC, boolean booleanD,
+        float floatE, short shortF, short shortG, int intVal) {
+        super(intA, doubleB, intB, charC, booleanD, floatE, shortF, shortG);
+        intH = intVal;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackClass.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackClass.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackClass.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackClass.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,238 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.instancecallbacks;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import javax.jdo.Extent;
+import javax.jdo.InstanceCallbacks;
+import javax.jdo.JDOHelper;
+import javax.jdo.PersistenceManager;
+import javax.jdo.Transaction;
+
+import org.apache.jdo.tck.JDO_Test;
+
+public class InstanceCallbackClass implements InstanceCallbacks {
+    public static boolean performPreClearTests;
+    public static boolean performPreDeleteTests;
+    public static boolean performPreStoreTests;
+    
+    // The following two variables used in CallingJdoPreDelete tests
+    public static boolean preDeleteCalled;
+    public static int objectState;
+       
+    // The rest of these variables used in FieldsInPredelete tests, except to set a variable to make object dirty.
+    public static int arraySize = 5;
+    public static String[] capturedName = new String[arraySize];
+    public static Date[] capturedTimeStamp = new Date[arraySize];
+    public static double[] capturedDoubleValue = new double[arraySize];
+    public static short[] capturedChildToDelete = new short[arraySize];
+    public static char[] capturedCharValue = new char[arraySize];
+    public static String[] capturedNextObjName = new String[arraySize];
+    public static int[] numberOfChildren = new int[arraySize];
+    public static int[] sumOfChildrenIntValue = new int[arraySize];
+    public static boolean[] processedIndex = new boolean[arraySize];
+    
+    public static boolean[] transactionActive = new boolean[arraySize];
+    
+    private static int nextKeyValue = 1;
+    private int keyValue;  // persistent--used as key field in application identity
+    public String           name;
+    public Date            timeStamp;
+    public InstanceCallbackClass  nextObj;
+    public HashSet         children;
+    public int             intValue;
+    public double          doubleValue;
+    public short           childToDelete;
+    public char            charValue;
+    
+    public static void initializeStaticsForTest()
+    {
+        performPreClearTests = false;
+        performPreDeleteTests = false;
+        performPreStoreTests = false;
+        preDeleteCalled = false;
+        for( int i = 0; i < arraySize; ++i){
+            processedIndex[i] = false;
+            transactionActive[i] = false;
+        }      
+    }
+
+    public static void removeAllInstances(PersistenceManager pm)
+    {
+        Extent e = pm.getExtent(InstanceCallbackClass.class, true);
+        Iterator i = e.iterator();
+        while( i.hasNext() ){
+            pm.deletePersistent(i.next());
+        }        
+    }
+    
+    public InstanceCallbackClass() { // not used by application
+    }
+    
+    public InstanceCallbackClass(String label,Date createTime,int intValue,double doubleValue,short childToDelete,char charValue,InstanceCallbackClass obj) {
+        keyValue = nextKeyValue++;
+        name = label;
+        timeStamp = createTime;
+        nextObj = obj;
+        children = new HashSet();
+        this.intValue = intValue;
+        this.doubleValue = doubleValue;
+        this.childToDelete = childToDelete;
+        this.charValue = charValue;
+    }
+    
+    public void addChild(InstanceCallbackClass child) {
+        children.add(child);
+    }
+    
+    public void jdoPreStore() {
+        if(!performPreStoreTests) { return; }
+        captureValues();
+        PersistenceManager pm = JDOHelper.getPersistenceManager(this);
+        usePM(pm);
+    }
+    
+    public void jdoPreDelete() {
+        if(!performPreDeleteTests) { return; }
+        // The following two variables set for CallingJdoPreDelete tests
+        preDeleteCalled = true;
+        objectState = JDO_Test.currentState(this);
+        
+        captureValues();
+        
+        // The rest of this routine used for Accessing FieldsInPredelete tests
+        // check that intValue is a valid index
+        if(intValue >= 0 & intValue < arraySize) {
+            PersistenceManager pm = JDOHelper.getPersistenceManager(this);
+            usePM(pm);
+            if(nextObj != null) {
+                pm.deletePersistent(nextObj);  // delete referenced object
+
+                // delete designated child
+                for(Iterator i = children.iterator(); i.hasNext();) {
+                     InstanceCallbackClass obj =  (InstanceCallbackClass)i.next();
+                     if( obj.intValue == childToDelete) {
+                        pm.deletePersistent(obj);
+                        break;
+                     }
+                }
+            }
+        }
+    }
+    
+    public void jdoPostLoad() {
+    }
+    
+    public void jdoPreClear() {
+        if(!performPreClearTests) { return; }
+        // the following code is copied from captureValues, because it must
+        // not be enhanced for execution during jdoPreClear.
+        // check that intValue is a valid index
+        if(intValue >= 0 & intValue < arraySize) {
+            processedIndex[intValue] = true;
+            
+            // capture values of the attributes
+            capturedName[intValue] =  name;
+            capturedTimeStamp[intValue] = timeStamp;
+            capturedDoubleValue[intValue] = doubleValue;
+            numberOfChildren[intValue] = children.size();
+            sumOfChildrenIntValue[intValue] = 0;
+            for(Iterator i = children.iterator(); i.hasNext();) {
+                InstanceCallbackClass o = (InstanceCallbackClass)i.next();
+                sumOfChildrenIntValue[intValue] += o.intValue;   
+            }
+            capturedChildToDelete[intValue] = childToDelete;
+            capturedCharValue[intValue] = charValue;
+            if(nextObj != null) {
+                capturedNextObjName[intValue] = nextObj.name;
+            } else {
+                capturedNextObjName[intValue] = null;
+            }
+        }
+    }
+    
+    void captureValues() {
+        // check that intValue is a valid index
+        if(intValue >= 0 & intValue < arraySize) {
+            processedIndex[intValue] = true;
+            
+            // capture values of the attributes
+            capturedName[intValue] =  name;
+            capturedTimeStamp[intValue] = timeStamp;
+            capturedDoubleValue[intValue] = doubleValue;
+            numberOfChildren[intValue] = children.size();
+            sumOfChildrenIntValue[intValue] = 0;
+            for(Iterator i = children.iterator(); i.hasNext();) {
+                InstanceCallbackClass o = (InstanceCallbackClass)i.next();
+                sumOfChildrenIntValue[intValue] += o.intValue;   
+            }
+            capturedChildToDelete[intValue] = childToDelete;
+            capturedCharValue[intValue] = charValue;
+            if(nextObj != null) {
+                capturedNextObjName[intValue] = nextObj.name;
+            } else {
+                capturedNextObjName[intValue] = null;
+            }
+        }
+    }
+    
+    void usePM(PersistenceManager pm) {
+        if(intValue >= 0 & intValue < arraySize) {
+            Transaction t = pm.currentTransaction();
+            if(t.isActive()) {
+                transactionActive[intValue] = true;
+            }
+        }
+    }
+    
+public static class KeyClass implements Serializable, Comparable {
+    public int keyValue;
+
+    public KeyClass() {
+    }
+
+    public KeyClass(String s) {
+        try{ keyValue = Integer.parseInt(s);}
+        catch(NumberFormatException e){
+            keyValue = 0;}
+    }
+    
+    public boolean equals(Object obj) {
+        if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+        else return keyValue == ((KeyClass)obj).keyValue;
+    }
+    
+    public int hashCode() {
+        return keyValue;
+    }
+    
+    public String toString() {
+        return Integer.toString(keyValue);
+    } 
+    
+    public int compareTo(Object obj) {
+        // may throw ClassCastException to be handled by user.
+        return keyValue - ((KeyClass)obj).keyValue;
+    }
+    
+}
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackNonPersistFdsClass.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackNonPersistFdsClass.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackNonPersistFdsClass.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/instancecallbacks/InstanceCallbackNonPersistFdsClass.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,307 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.instancecallbacks;
+
+import java.io.*;
+import java.util.*;
+import javax.jdo.*;
+
+public class InstanceCallbackNonPersistFdsClass implements InstanceCallbacks {
+    public int i;      // non-managed
+    public char c;     // non-managed
+    public double d;           // transactional
+    public short s;            // transactional
+    public HashSet children;   // non-managed
+    public Date loadTime;      // non-managed
+    
+    private int keyValue;  // persistent--used as key field in application identity
+    public float floatValue; // persistent
+    public int intValue;  // persistent  --primary key field
+    
+    private static int nextKeyValue = 1;
+    
+    public static int savedIntValue;
+    public static float savedFloatValue;
+    
+    public static Date savedLoadTime;
+    public static String member1 = "one";
+    public static String member2 = "two";
+    public static String member3 = "three";
+    
+    public static boolean preClearCalled = false;
+    public static boolean preStoreCalled = false;
+    public static boolean preDeleteCalled = false;
+    public static boolean postloadCalled = false;
+    public static boolean postloadCalledMultipleTimes = false;
+    
+    // used in CallingJdoPostload test
+    public static int beforeGetObjectById = 1;
+    public static int afterGetObjectById = 2;
+    public static int savedApplicationStep;
+    public static int applicationStep;  // values are 0, beforeGetObjectById and afterGetObjectById 
+    
+    // used in ModificationOfNontransactionalNonpersistentFields test
+    public static ArrayList exceptions = new ArrayList();
+    public static ArrayList callbackCalled = new ArrayList();
+    public static ArrayList attributeOpCausingExceptions = new ArrayList();
+
+    public static void initializeStaticsForTest()
+    {
+        savedIntValue = 0;
+        savedFloatValue = 0.0f;
+        savedLoadTime = null;   
+        preClearCalled = false;
+        preStoreCalled = false;
+        preDeleteCalled = false;
+        postloadCalled = false;
+        postloadCalledMultipleTimes = false;
+        savedApplicationStep = 0;
+        applicationStep = 0;
+    
+        exceptions = new ArrayList();
+        callbackCalled = new ArrayList();
+        attributeOpCausingExceptions = new ArrayList();
+    }    
+
+    public static void removeAllInstances(PersistenceManager pm)
+    {
+        Extent e = pm.getExtent(org.apache.jdo.tck.pc.instancecallbacks.InstanceCallbackNonPersistFdsClass.class, true);
+        Iterator i = e.iterator();
+        while( i.hasNext() ){
+            pm.deletePersistent(i.next());
+        }        
+    }
+
+    public InstanceCallbackNonPersistFdsClass()
+    {
+    }
+    
+    public InstanceCallbackNonPersistFdsClass(float floatValue,int intValue) {
+        keyValue = nextKeyValue++;
+        this.floatValue = floatValue;
+        this.intValue = intValue;
+    }
+    
+    public void setNonPersist(int i, char c, double d, short s) {
+        this.i = i;
+        this.c = c;
+        this.d = d;
+        this.s = s;
+    }
+    
+    public void setNonManaged(int i, char c) {
+        this.i = i;
+        this.c = c;
+    }
+    
+    public int calcIntValue() {
+        return i * c;
+    }
+    
+    public float calcFloatValue () {
+        return (float)(d * s);
+    }
+    
+    public void incrementIntValue() {
+        intValue++;
+    }
+    
+    public void jdoPreStore() {
+        preStoreCalled = true;
+        intValue = calcIntValue();
+        floatValue = calcFloatValue();
+        
+        try {
+            i = -30;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("i = -30;");
+        }
+        try {
+            c = '\u0000';
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("c = '\u0000';");
+        }
+        try {
+            d = 362.5;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("d = 362.5;");
+        }
+        try {
+            s = 0;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("s = 0;");
+        }
+        try {
+            loadTime = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("loadTime = null;");
+        }
+        try {
+            children = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreStore ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("children = null;");
+        }
+    }
+    
+    public void jdoPreDelete() {
+        preDeleteCalled = true;
+        try {
+            i = 0;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("i = 0;");
+        }
+        try {
+            c = 'x';
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("c = 'x';");
+        }
+        try {
+            d = 0.0;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("d = 0.0;");
+        }
+        try {
+            s = -5;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("s = -5;");
+        }
+        try {
+            loadTime = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("loadTime = null;");
+        }
+        try {
+            children = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreDelete ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("children = null;");
+        }
+    }
+    
+    public void jdoPostLoad() {
+        postloadCalled = true;
+        savedApplicationStep = applicationStep;
+        i = -10;
+        c = '2';
+        d = 30.0;
+        s = 40;
+        savedIntValue = intValue;
+        savedFloatValue = floatValue;
+        loadTime = new Date();
+        savedLoadTime = loadTime;
+        children = new HashSet();
+        children.add(member1);
+        children.add(member2);
+        children.add(member3);
+    }
+    
+    public void jdoPreClear() {
+        preClearCalled = true;
+        try {
+            i = 1;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("i = 1;");
+        }
+        try {
+            c = '2';
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("c = '2';");
+        }
+        try {
+            d = 3.0;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("d = 3.0;");
+        }
+        try {
+            s = 4;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("s = 4;");
+        }
+        try {
+            loadTime = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("loadTime = null;");
+        }
+        try {
+            children = null;
+        }catch(Exception e) {
+            callbackCalled.add("jdoPreClear ");
+            exceptions.add(e);
+            attributeOpCausingExceptions.add("children = null;");
+        }
+    }
+    
+public static class KeyClass implements Serializable {
+    public int keyValue;
+
+    public KeyClass() {
+    }
+
+    public KeyClass(String s) {
+        try{ keyValue = Integer.parseInt(s);}
+        catch(NumberFormatException e){
+            keyValue = 0;}
+    }    
+    
+    public boolean equals(Object obj) {
+        if( obj == null || !this.getClass().equals(obj.getClass()) ) return false;
+        else return keyValue == ((KeyClass)obj).keyValue;
+    }
+    
+    public int hashCode() {
+        return keyValue;
+    }
+
+    public String toString() {
+        return Integer.toString(keyValue);
+    }
+}
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/lifecycle/StateTransitionObj.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.lifecycle;
+
+public class StateTransitionObj {
+    private int      int_field;
+    private transient int nonmanaged_field;
+    
+    public StateTransitionObj()
+    {
+        int_field = 0;
+    }
+    public StateTransitionObj(int v)
+    {
+        int_field = v;
+    }
+    public int readField()
+    { 
+        int value = int_field;
+        return value;
+    } 
+    public void writeField(int value)
+    {
+        int_field = value;
+    }
+    public int readNonmanagedField()
+    {
+        return nonmanaged_field;
+    }
+    public void writeNonmanagedField(int value)
+    {
+        nonmanaged_field = value;
+    }
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,106 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.mylib;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+* A simple class with two fields for application identity
+*
+* @author Marina Vatkina
+*/
+public class PCPoint implements Serializable {
+    
+    
+    private static long counter = new Date().getTime();
+    private static long newId() {
+        synchronized (PCPoint.class) {
+            return counter++;
+        }
+    }
+    private long id = newId();
+    public int x;
+    public Integer y;
+
+    public PCPoint() {
+    }
+
+    public PCPoint(int x, int y) {
+        this.x = x;
+        this.y = new Integer(y);
+    }
+
+    public PCPoint(int x, Integer y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    public String toString() {
+        String rc = null;
+	Object obj = this;
+        try {
+	    rc = obj.getClass().getName();
+            //rc = Util.getClassName(this) + name();
+        } catch (NullPointerException ex) {
+            rc = "NPE getting PCPoint's values";
+        }
+        return rc;
+    }
+
+    public void setX(int x) {
+        this.x = x;
+    }
+
+    public int getX() {
+        return x;
+    }
+
+    public void setY(Integer y) {
+        this.y = y;
+    }
+
+    public Integer getY() {
+        return y;
+    }
+    
+    public String name() {
+        return " x: " + getX() + ", y: " + getY().intValue();
+    }
+
+    public static class Oid implements Serializable {
+        public long id;
+
+        public Oid() {
+        }
+
+        public Oid(String s) { id = Long.parseLong(s); }
+
+        public String toString() { return this.getClass().getName() + ": "  + id;}
+
+        public int hashCode() { return (int)id ; }
+
+        public boolean equals(Object other) {
+            if (other != null && (other instanceof Oid)) {
+                Oid k = (Oid)other;
+                return k.id == this.id;
+            }
+            return false;
+        }
+
+    }   
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint2.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint2.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint2.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCPoint2.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.mylib;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.jdo.InstanceCallbacks;
+
+/**
+* A simple class with two fields for application identity
+*
+* @author Marina Vatkina
+*/
+public class PCPoint2 implements Serializable, InstanceCallbacks {
+    
+    private static long counter = new Date().getTime();
+    private static long newId() {
+        synchronized (PCPoint2.class) {
+            return counter++;
+        }
+    }
+    private long id = newId();
+    public int x;
+    public Integer y;
+
+    private boolean clearCalled = false;
+    private boolean loadCalled = false;
+    private boolean storeCalled = false;
+    private boolean deleteCalled = false;
+
+    public void jdoPreClear() {
+        clearCalled = true;
+    }
+
+    public void jdoPostLoad() {
+        loadCalled = true;
+    }
+
+    public void jdoPreStore() {
+        storeCalled = true;
+    }
+
+    public void jdoPreDelete() {
+        deleteCalled = true;
+    }
+
+    public boolean wasClearCalled() {
+        return clearCalled;
+    }
+
+    public boolean wasPostLoadCalled() {
+        return loadCalled;
+    }
+
+    public boolean wasPreStoreCalled() {
+        return storeCalled;
+    }
+
+    public boolean wasPreDeleteCalled() {
+        return deleteCalled;
+    }
+
+    public PCPoint2() {
+    }
+
+    public PCPoint2(int x, int y) {
+        this.x = x;
+        this.y = new Integer(y);
+    }
+
+    public PCPoint2(int x, Integer y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    public String toString() {
+        String rc = null;
+	Object obj = this;
+        try {
+	    rc = obj.getClass().getName();
+            //rc = Util.getClassName(this) + name();
+        } catch (NullPointerException ex) {
+            rc = "NPE getting PCPoint2's values";
+        }
+        return rc;
+    }
+
+    public void setX(int x) {
+        this.x = x;
+    }
+
+    public int getX() {
+        return x;
+    }
+
+    public void setY(Integer y) {
+        this.y = y;
+    }
+
+    public Integer getY() {
+        return y;
+    }
+    
+    public String name() {
+        return " x: " + getX() + ", y: " + getY().intValue();
+    }
+
+    public static class Oid implements Serializable {
+        public long id;
+
+        public Oid() {
+        }
+
+        public Oid(String s) { id = Long.parseLong(s); }
+
+        public String toString() { return this.getClass().getName() + ": "  + id;}
+
+        public int hashCode() { return (int)id ; }
+
+        public boolean equals(Object other) {
+            if (other != null && (other instanceof Oid)) {
+                Oid k = (Oid)other;
+                return k.id == this.id;
+            }
+            return false;
+        }
+
+    }   
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCRect.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCRect.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCRect.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/PCRect.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.mylib;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+* Test for instances with application identity containing instances of 
+* a user-defined class.
+*
+* @author Marina Vatkina
+*/
+public class PCRect {
+    
+    private static long counter = new Date().getTime();
+    private static long newId() {
+        synchronized (PCRect.class) {
+            return counter++;
+        }
+    }
+
+    public long id = newId();
+
+    public PCPoint upperLeft;
+    public PCPoint lowerRight;
+
+    public PCRect() { }
+
+    public PCRect(long id, PCPoint ul, PCPoint lr) {
+        upperLeft = ul;
+        lowerRight = lr;
+    }
+
+    public PCPoint getUpperLeft() {
+        return upperLeft;
+    }
+
+    public PCPoint getLowerRight() {
+        return lowerRight;
+    }
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String toString() {
+        String rc = null;
+	Object obj = this;
+        try {
+            //rc = Util.getClassName(this)
+	     rc = obj.getClass().getName()
+                + " ul: " + getUpperLeft().name()
+                + " lr: " + getLowerRight().name();
+        } catch (NullPointerException ex) {
+            rc = "NPE getting PCRect's values";
+        }
+        return rc;
+    }
+
+    public static class Oid implements Serializable {
+        public long id;
+
+        public Oid() {
+        }
+
+        public Oid(String s) { id = Long.parseLong(s); }
+
+        public String toString() { return this.getClass().getName() + ": "  + id;}
+
+        public int hashCode() { return (int)id ; }
+
+        public boolean equals(Object other) {
+            if (other != null && (other instanceof Oid)) {
+                Oid k = (Oid)other;
+                return k.id == this.id;
+            }
+            return false;
+        }
+
+    }
+
+}

Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/Point.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/Point.java?view=auto&rev=158179
==============================================================================
--- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/Point.java (added)
+++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/mylib/Point.java Fri Mar 18 17:07:39 2005
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed 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.mylib;
+
+/**
+* A simple class with two fields
+*
+* @author Dave Bristor
+*/
+public class Point {
+    public int x;
+    public Integer y;
+
+    public Point() { }
+
+    public Point(int x, int y) {
+        this.x = x;
+        this.y = new Integer(y);
+    }
+
+    public Point(int x, Integer y) {
+        this.x = x;
+        this.y = y;
+    }
+
+    public String toString() {
+        String rc = null;
+	Object obj = this;
+        try {
+	    rc = obj.getClass().getName();
+            //rc = Util.getClassName(this) + name();
+        } catch (NullPointerException ex) {
+            rc = "NPE getting Point's values";
+        }
+        return rc;
+    }
+
+    public int getX() {
+        System.out.println("Hello from Point.getX");
+        return x;
+    }
+
+    public Integer getY() {
+        System.out.println("Hello from Point.getY");
+        return y;
+    }
+    
+    public String name() {
+        return " x: " + getX() + ", y: " + getY().intValue();
+    }
+}



Mime
View raw message