You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2008/02/15 10:20:40 UTC
svn commit: r627979 [13/39] - in /openjpa/trunk:
openjpa-lib/src/test/java/org/apache/openjpa/lib/test/
openjpa-persistence-jdbc/ openjpa-persistence-jdbc/src/test/java/
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/
openjpa-per...
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,70 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+
+import java.util.*;
+import java.io.*;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+@Entity
+public class AttachC
+ extends AttachB {
+
+ private String cstr;
+ private int cint;
+ private double cdbl;
+ private List es = new LinkedList(); // non-DFG
+
+ public void setCstr(String cstr) {
+ this.cstr = cstr;
+ }
+
+ public String getCstr() {
+ return this.cstr;
+ }
+
+ public void setCint(int cint) {
+ this.cint = cint;
+ }
+
+ public int getCint() {
+ return this.cint;
+ }
+
+ public void setCdbl(double cdbl) {
+ this.cdbl = cdbl;
+ }
+
+ public double getCdbl() {
+ return this.cdbl;
+ }
+
+ public void setEs(List es) {
+ this.es = es;
+ }
+
+ public List getEs() {
+ return this.es;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachD.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachD.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachD.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachD.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,122 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+
+import java.util.*;
+import java.io.*;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+@Entity
+public class AttachD
+ implements Serializable {
+
+ private Object version;
+
+ private String dstr;
+ private int dint;
+ private double ddbl;
+ private AttachA a;
+ private Set bs = new HashSet(); // DFG
+ private Map pcStringMap = new HashMap();
+ private TreeMap bigIntegerPCMap = new TreeMap();
+
+ private AttachE embeddedE;
+ private AttachA embeddedA;
+
+ public void setDstr(String dstr) {
+ this.dstr = dstr;
+ }
+
+ public String getDstr() {
+ return this.dstr;
+ }
+
+ public void setDint(int dint) {
+ this.dint = dint;
+ }
+
+ public int getDint() {
+ return this.dint;
+ }
+
+ public void setDdbl(double ddbl) {
+ this.ddbl = ddbl;
+ }
+
+ public double getDdbl() {
+ return this.ddbl;
+ }
+
+ public AttachA getA() {
+ return a;
+ }
+
+ public void setA(AttachA a) {
+ this.a = a;
+ }
+
+ public void setBs(Set bs) {
+ this.bs = bs;
+ }
+
+ public Set getBs() {
+ return this.bs;
+ }
+
+ public void setPcStringMap(Map pcStringMap) {
+ this.pcStringMap = pcStringMap;
+ }
+
+ public Map getPcStringMap() {
+ return this.pcStringMap;
+ }
+
+ public void setBigIntegerPCMap(TreeMap bigIntegerPCMap) {
+ this.bigIntegerPCMap = bigIntegerPCMap;
+ }
+
+ public TreeMap getBigIntegerPCMap() {
+ return this.bigIntegerPCMap;
+ }
+
+ public void setEmbeddedE(AttachE embeddedE) {
+ this.embeddedE = embeddedE;
+ }
+
+ public AttachE getEmbeddedE() {
+ return this.embeddedE;
+ }
+
+ public void setEmbeddedA(AttachA embeddedA) {
+ this.embeddedA = embeddedA;
+ }
+
+ public AttachA getEmbeddedA() {
+ return this.embeddedA;
+ }
+
+ public Object getVersion() {
+ return this.version;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachE.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachE.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachE.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachE.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,90 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+
+import java.util.*;
+import java.io.*;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+@Entity
+public class AttachE
+ implements Serializable {
+
+ private Object version;
+
+ private String estr;
+ private int eint;
+ private double edbl;
+ private AttachB b;
+ private AttachF f;
+ private Date date;
+
+ public void setEstr(String estr) {
+ this.estr = estr;
+ }
+
+ public String getEstr() {
+ return this.estr;
+ }
+
+ public void setEint(int eint) {
+ this.eint = eint;
+ }
+
+ public int getEint() {
+ return this.eint;
+ }
+
+ public void setEdbl(double edbl) {
+ this.edbl = edbl;
+ }
+
+ public double getEdbl() {
+ return this.edbl;
+ }
+
+ public void setB(AttachB b) {
+ this.b = b;
+ }
+
+ public AttachB getB() {
+ return this.b;
+ }
+
+ public void setF(AttachF f) {
+ this.f = f;
+ }
+
+ public AttachF getF() {
+ return this.f;
+ }
+
+ public void setDate(Date date) {
+ this.date = date;
+ }
+
+ public Date getDate() {
+ return this.date;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachF.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachF.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachF.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AttachF.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,139 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+import java.util.*;
+import java.io.*;
+
+
+@Entity
+public class AttachF
+ implements Serializable {
+
+ private int id1;
+ private String id2;
+
+ private String fstr;
+ private int fint;
+ private double fdbl;
+ private AttachE e;
+ private List strings = new ArrayList();
+
+ private AttachC embeddedC;
+
+ public void setFstr(String fstr) {
+ this.fstr = fstr;
+ }
+
+ public String getFstr() {
+ return this.fstr;
+ }
+
+ public void setFint(int fint) {
+ this.fint = fint;
+ }
+
+ public int getFint() {
+ return this.fint;
+ }
+
+ public void setFdbl(double fdbl) {
+ this.fdbl = fdbl;
+ }
+
+ public double getFdbl() {
+ return this.fdbl;
+ }
+
+ public void setE(AttachE e) {
+ this.e = e;
+ }
+
+ public AttachE getE() {
+ return this.e;
+ }
+
+ public void setStrings(List strings) {
+ this.strings = strings;
+ }
+
+ public List getStrings() {
+ return this.strings;
+ }
+
+ public static class ID {
+
+ public int id1;
+ public String id2;
+
+ public ID() {
+ }
+
+ public ID(String str) {
+ StringTokenizer tok = new StringTokenizer(str, ":");
+ id1 = Integer.parseInt(tok.nextToken());
+ id2 = tok.nextToken();
+ }
+
+ public int hashCode() {
+ return id1 + (id2 == null ? 0 : id2.hashCode());
+ }
+
+ public String toString() {
+ return id1 + ":" + id2;
+ }
+
+ public boolean equals(Object other) {
+ return other instanceof ID
+ && ((ID) other).id1 == id1
+ && (id2 == null ? ((ID) other).id2 == null
+ : id2.equals(((ID) other).id2));
+ }
+ }
+
+ public void setId1(int id1) {
+ this.id1 = id1;
+ }
+
+ public int getId1() {
+ return this.id1;
+ }
+
+ public void setId2(String id2) {
+ this.id2 = id2;
+ }
+
+ public String getId2() {
+ return this.id2;
+ }
+
+ public void setEmbeddedC(AttachC embeddedC) {
+ this.embeddedC = embeddedC;
+ }
+
+ public AttachC getEmbeddedC() {
+ return this.embeddedC;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,81 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+
+import java.util.*;
+
+
+@Entity
+public class AutoIncrementOpOrderPC {
+
+ @Id
+ private long id;
+ private AutoIncrementOpOrderPC rel;
+ private AutoIncrementOpOrderPC owner;
+ private String secondary;
+ private List relList = new ArrayList();
+ private List mappedRelList = new ArrayList();
+ private List inverseKeyRelList = new ArrayList();
+
+ public long getId() {
+ return id;
+ }
+
+ public OpOrder getRel() {
+ return (OpOrder) rel;
+ }
+
+ public void setRel(AutoIncrementOpOrderPC rel) {
+ this.rel = rel;
+ }
+
+ public OpOrder getOwner() {
+ return (OpOrder) owner;
+ }
+
+ public void setOwner(AutoIncrementOpOrderPC owner) {
+ this.owner = owner;
+ }
+
+ public String getSecondary() {
+ return secondary;
+ }
+
+ public void setSecondary(String secondary) {
+ this.secondary = secondary;
+ }
+
+ public List getRelList() {
+ return relList;
+ }
+
+ public List getMappedRelList() {
+ return mappedRelList;
+ }
+
+ public List getInverseKeyRelList() {
+ return inverseKeyRelList;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPCSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPCSub.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPCSub.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementOpOrderPCSub.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+import java.util.*;
+
+
+@Entity
+public class AutoIncrementOpOrderPCSub
+ extends AutoIncrementOpOrderPC
+ implements OpOrder {
+
+ @Id
+ private String sub;
+
+ public String getSub() {
+ return sub;
+ }
+
+ public void setSub(String sub) {
+ this.sub = sub;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC1.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,98 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import java.util.*;
+import javax.persistence.*;
+
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@Entity
+@Table(name="autoincpc1")
+@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
+public class AutoIncrementPC1
+{
+
+ private Set setField = new HashSet ();
+
+ @Id
+ private int id;
+
+ @Column(name="strngfld", length=50)
+ private String stringField = null;
+
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private AutoIncrementPC1 oneOne = null;
+
+ public AutoIncrementPC1()
+ {
+ }
+
+ public AutoIncrementPC1(int key)
+ {
+ this.id = key;
+ }
+
+ public Set getSetField ()
+ {
+ return this.setField;
+ }
+
+ public void setSetField (Set setField)
+ {
+ this.setField = setField;
+ }
+
+
+ public String getStringField ()
+ {
+ return this.stringField;
+ }
+
+
+ public void setStringField (String stringField)
+ {
+ this.stringField = stringField;
+ }
+
+
+ public AutoIncrementPC1 getOneOne ()
+ {
+ return this.oneOne;
+ }
+
+
+ public void setOneOne (AutoIncrementPC1 oneOne)
+ {
+ this.oneOne = oneOne;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,58 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import java.util.*;
+
+import javax.persistence.*;
+
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@DiscriminatorValue("autoinc2")
+@Entity
+public class AutoIncrementPC2 extends AutoIncrementPC1
+{
+ private int intField = 0;
+
+ public AutoIncrementPC2()
+ {
+ }
+
+ public AutoIncrementPC2(int id)
+ {
+ super(id);
+ }
+
+
+ public int getIntField ()
+ {
+ return this.intField;
+ }
+
+
+ public void setIntField (int intField)
+ {
+ this.intField = intField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,104 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import java.util.*;
+
+import javax.persistence.*;
+import org.apache.openjpa.persistence.jdbc.common.apps.*;
+
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@IdClass(AutoIncrementPC3Id.class)
+@Entity
+@Table(name="autoincpc3")
+public class AutoIncrementPC3
+{
+ @Id
+ private long id = 0;
+ private Set setField = new HashSet ();
+
+ @Column(name="strngfld", length=50)
+ private String stringField = null;
+
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private AutoIncrementPC3 oneOne = null;
+
+ public AutoIncrementPC3()
+ {
+ }
+
+ public AutoIncrementPC3(int id)
+ {
+ this.id = id;
+ }
+
+
+ public long getId ()
+ {
+ return this.id;
+ }
+
+
+ public void setId (long id)
+ {
+ this.id = id;
+ }
+
+
+ public Set getSetField ()
+ {
+ return this.setField;
+ }
+
+
+ public void setSetField (Set setField)
+ {
+ this.setField = setField;
+ }
+
+
+ public String getStringField ()
+ {
+ return this.stringField;
+ }
+
+
+ public void setStringField (String stringField)
+ {
+ this.stringField = stringField;
+ }
+
+
+ public AutoIncrementPC3 getOneOne ()
+ {
+ return this.oneOne;
+ }
+
+
+ public void setOneOne (AutoIncrementPC3 oneOne)
+ {
+ this.oneOne = oneOne;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3Id.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3Id.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3Id.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/AutoIncrementPC3Id.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,74 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import java.io.*;
+
+
+/**
+ * Auto-generated by:
+ * kodo.enhance.ApplicationIdTool
+ */
+@SuppressWarnings("serial")
+public class AutoIncrementPC3Id implements Serializable
+{
+ static
+ {
+ // register persistent class in JVM
+ Class c = AutoIncrementPC3.class;
+ }
+
+ public long id;
+
+
+ public AutoIncrementPC3Id ()
+ {
+ }
+
+
+ public AutoIncrementPC3Id (String fromString)
+ {
+ id = Long.parseLong (fromString);
+ }
+
+
+ public String toString ()
+ {
+ return String.valueOf (id);
+ }
+
+
+ public int hashCode ()
+ {
+ return (int) (id % Integer.MAX_VALUE);
+ }
+
+
+ public boolean equals (Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (!(obj instanceof AutoIncrementPC3Id))
+ return false;
+
+ AutoIncrementPC3Id other = (AutoIncrementPC3Id) obj;
+ return (id == other.id);
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/Base.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/Base.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/Base.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/Base.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,43 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+
+public class Base
+ implements Comparable {
+
+ private int baseField;
+
+ public int getBaseField() {
+ return this.baseField;
+ }
+
+ public void setBaseField(int baseField) {
+ this.baseField = baseField;
+ }
+
+ public int compareTo(Object other) {
+ if (other == this)
+ return 0;
+ if (other == null)
+ return 1;
+ return baseField - ((Base) other).baseField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class BaseSub1
+ extends Base {
+
+ private int baseSub1Field;
+
+ public int getBaseSub1Field() {
+ return this.baseSub1Field;
+ }
+
+ public void setBaseSub1Field(int baseSub1Field) {
+ this.baseSub1Field = baseSub1Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub1.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub1.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub1.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub1.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class BaseSub1Sub1
+ extends BaseSub1 {
+
+ private int baseSub1Sub1Field;
+
+ public int getBaseSub1Sub1Field() {
+ return this.baseSub1Sub1Field;
+ }
+
+ public void setBaseSub1Sub1Field(int baseSub1Sub1Field) {
+ this.baseSub1Sub1Field = baseSub1Sub1Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub1Sub2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class BaseSub1Sub2
+ extends BaseSub1 {
+
+ private int baseSub1Sub2Field;
+
+ public int getBaseSub1Sub2Field() {
+ return this.baseSub1Sub2Field;
+ }
+
+ public void setBaseSub1Sub2Field(int baseSub1Sub2Field) {
+ this.baseSub1Sub2Field = baseSub1Sub2Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BaseSub2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class BaseSub2
+ extends Base {
+
+ private int baseSub2Field;
+
+ public int getBaseSub2Field() {
+ return this.baseSub2Field;
+ }
+
+ public void setBaseSub2Field(int baseSub2Field) {
+ this.baseSub2Field = baseSub2Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BuildSchemaPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BuildSchemaPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BuildSchemaPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/BuildSchemaPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+/**
+ * <p>Persistent type used in testing the mappingtool's buildSchema action.</p>
+ *
+ * @author Abe White
+ */
+public class BuildSchemaPC {
+
+ private String stringField = null;
+ private int intField = 0;
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public int getIntField() {
+ return this.intField;
+ }
+
+ public void setIntField(int intField) {
+ this.intField = intField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+
+/**
+ * <p>Persistent type using a byte[] for a primary key field. Used in
+ * {@link TestByteArrayAppId}.</p>
+ *
+ * @author Abe White
+ */
+public class ByteArrayPKPC {
+
+ private byte[] pk = null;
+ private String stringField = null;
+ private List rels = new ArrayList();
+ private ByteArrayPKPC parent = null;
+
+ public ByteArrayPKPC() {
+ }
+
+ public ByteArrayPKPC(byte[] pk, String stringField) {
+ this.pk = pk;
+ this.stringField = stringField;
+ }
+
+ public byte[] getPK() {
+ return pk;
+ }
+
+ public void setPK(byte[] pk) {
+ this.pk = pk;
+ }
+
+ public String getStringField() {
+ return stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public ByteArrayPKPC getParent() {
+ return parent;
+ }
+
+ public void setParent(ByteArrayPKPC parent) {
+ this.parent = parent;
+ }
+
+ public List getRels() {
+ return this.rels;
+ }
+
+ public void setRels(List rels) {
+ this.rels = rels;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPC2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+/**
+ * <p>Persistent type using a byte[] for a primary key field. Used in
+ * {@link TestByteArrayAppId}.</p>
+ *
+ * @author Abe White
+ */
+public class ByteArrayPKPC2
+ extends ByteArrayPKPC {
+
+ private String subfield = null;
+
+ public ByteArrayPKPC2() {
+ }
+
+ public ByteArrayPKPC2(byte[] pk, String stringField) {
+ super(pk, stringField);
+ }
+
+ public String getSubfield() {
+ return this.subfield;
+ }
+
+ public void setSubfield(String subfield) {
+ this.subfield = subfield;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPCId.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPCId.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPCId.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ByteArrayPKPCId.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,120 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.io.*;
+
+/**
+ * Auto-generated by:
+ * org.apache.openjpa.enhance.ApplicationIdTool
+ */
+public class ByteArrayPKPCId implements Serializable {
+
+ private static final char[] HEX = new char[]{
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
+ };
+
+ static {
+ // register persistent class in JVM
+ Class c = ByteArrayPKPC.class;
+ }
+
+ public byte[] pk;
+
+ public ByteArrayPKPCId() {
+ }
+
+ public ByteArrayPKPCId(String fromString) {
+ pk = toBytes(fromString);
+ }
+
+ public String toString() {
+ return toString(pk);
+ }
+
+ public int hashCode() {
+ return hashCode(pk);
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (!(obj instanceof ByteArrayPKPCId))
+ return false;
+
+ ByteArrayPKPCId other = (ByteArrayPKPCId) obj;
+ return (equals(pk, other.pk));
+ }
+
+ private static byte[] toBytes(String s) {
+ if ("null".equals(s))
+ return null;
+
+ int len = s.length();
+ byte[] r = new byte[len / 2];
+ for (int i = 0; i < r.length; i++) {
+ int digit1 = s.charAt(i * 2), digit2 = s.charAt(i * 2 + 1);
+ if (digit1 >= '0' && digit1 <= '9')
+ digit1 -= '0';
+ else if (digit1 >= 'A' && digit1 <= 'F')
+ digit1 -= 'A' - 10;
+ if (digit2 >= '0' && digit2 <= '9')
+ digit2 -= '0';
+ else if (digit2 >= 'A' && digit2 <= 'F')
+ digit2 -= 'A' - 10;
+
+ r[i] = (byte) ((digit1 << 4) + digit2);
+ }
+ return r;
+ }
+
+ private static String toString(byte[] b) {
+ if (b == null)
+ return "null";
+
+ StringBuffer r = new StringBuffer(b.length * 2);
+ for (int i = 0; i < b.length; i++)
+ for (int j = 1; j >= 0; j--)
+ r.append(HEX[(b[i] >> (j * 4)) & 0xF]);
+ return r.toString();
+ }
+
+ private static boolean equals(byte[] b1, byte[] b2) {
+ if (b1 == null && b2 == null)
+ return true;
+ if (b1 == null || b2 == null)
+ return false;
+ if (b1.length != b2.length)
+ return false;
+ for (int i = 0; i < b1.length; i++)
+ if (b1[i] != b2[i])
+ return false;
+ return true;
+ }
+
+ private static int hashCode(byte[] b) {
+ if (b == null)
+ return 0;
+ int sum = 0;
+ for (int i = 0; i < b.length; i++)
+ sum += b[i];
+ return sum;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,57 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ */
+
+@Entity
+public class CircularFKPC {
+
+ @Id
+ private String stringField;
+ private CircularFKPC2 fkField;
+
+ public CircularFKPC() {
+
+ }
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public CircularFKPC2 getFKField() {
+ return this.fkField;
+ }
+
+ public void setFKField(CircularFKPC2 fkField) {
+ this.fkField = fkField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CircularFKPC2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,57 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ */
+
+@Entity
+public class CircularFKPC2 {
+
+ @Id
+ private String stringField;
+ private CircularFKPC fkField;
+
+ public CircularFKPC2() {
+
+ }
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public CircularFKPC getFKField() {
+ return this.fkField;
+ }
+
+ public void setFKField(CircularFKPC fkField) {
+ this.fkField = fkField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ComplexEmbeddedPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ComplexEmbeddedPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ComplexEmbeddedPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ComplexEmbeddedPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,65 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+
+import java.util.*;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+/**
+ * <p>Embedded type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@Entity
+public class ComplexEmbeddedPC
+ extends RecursivelyEmbeddedPC {
+
+
+ private String stringField;
+ private EmbeddedOwnerPC ownerField;
+ private Set stringSet = new HashSet();
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+
+ public EmbeddedOwnerPC getOwnerField() {
+ return this.ownerField;
+ }
+
+ public void setOwnerField(EmbeddedOwnerPC ownerField) {
+ this.ownerField = ownerField;
+ }
+
+ public Set getStringSet() {
+ return this.stringSet;
+ }
+
+ public void setStringSet(Set stringSet) {
+ this.stringSet = stringSet;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,70 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+
+public class ConstantJoinPC {
+
+ private int pk1;
+ private int pk2;
+ private NonPKJoinPC nonPK;
+ private NonPKJoinPC nonPK2;
+ private Collection nonPKs = new HashSet();
+
+ public int getPk1() {
+ return this.pk1;
+ }
+
+ public void setPk1(int pk1) {
+ this.pk1 = pk1;
+ }
+
+ public int getPk2() {
+ return this.pk2;
+ }
+
+ public void setPk2(int pk2) {
+ this.pk2 = pk2;
+ }
+
+ public NonPKJoinPC getNonPK() {
+ return this.nonPK;
+ }
+
+ public void setNonPK(NonPKJoinPC nonPK) {
+ this.nonPK = nonPK;
+ }
+
+ public NonPKJoinPC getNonPK2() {
+ return this.nonPK2;
+ }
+
+ public void setNonPK2(NonPKJoinPC nonPK2) {
+ this.nonPK2 = nonPK2;
+ }
+
+ public Collection getNonPKs() {
+ return this.nonPKs;
+ }
+
+ public void setNonPKs(Collection nonPKs) {
+ this.nonPKs = nonPKs;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class ConstantJoinPC2
+ extends ConstantJoinPC {
+
+ private int pc2Field;
+
+ public int getPc2Field() {
+ return this.pc2Field;
+ }
+
+ public void setPc2Field(int pc2Field) {
+ this.pc2Field = pc2Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC3.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC3.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC3.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,33 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+public class ConstantJoinPC3
+ extends ConstantJoinPC {
+
+ private int pc3Field;
+
+ public int getPc3Field() {
+ return this.pc3Field;
+ }
+
+ public void setPc3Field(int pc3Field) {
+ this.pc3Field = pc3Field;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC4.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,90 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+
+import java.util.*;
+import javax.persistence.*;
+
+@Entity
+@Table(name="conjoinpc4")
+public class ConstantJoinPC4
+{
+ @Column(length=50)
+ private String name;
+
+ @Id
+ private int id;
+
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private ConstantJoinPC5 oneToOne1;
+ @ManyToMany
+ private Set manyToMany = new HashSet ();
+
+ public ConstantJoinPC4()
+ {}
+
+ public ConstantJoinPC4 (String name, int id)
+ {
+ this.name = name;
+ this.id = id;
+ }
+
+
+ public String getName ()
+ {
+ return name;
+ }
+
+
+ public void setOneToOne1 (ConstantJoinPC5 val)
+ {
+ oneToOne1 = val;
+ }
+
+
+ public ConstantJoinPC5 getOneToOne1 ()
+ {
+ return oneToOne1;
+ }
+
+
+ public void setManyToMany (Set val)
+ {
+ manyToMany = val;
+ }
+
+
+ public Set getManyToMany ()
+ {
+ return manyToMany;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/ConstantJoinPC5.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,63 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import javax.persistence.*;
+
+@Entity
+@Table(name="conjoinpc5")
+public class ConstantJoinPC5
+{
+ @Id
+ private int id;
+
+ @Basic
+ private String name;
+
+ public ConstantJoinPC5()
+ {}
+
+ public ConstantJoinPC5(int id)
+ {
+ this.id = id;
+ }
+
+ public ConstantJoinPC5 (String name)
+ {
+ this.name = name;
+ }
+
+
+ public String getName ()
+ {
+ return name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
\ No newline at end of file
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/CustomMappingPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,80 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import javax.persistence.*;
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+
+@Entity
+@Table(name="custmappc")
+public class CustomMappingPC
+{
+
+ private boolean female;
+ @Column(length=50)
+ private String name;
+
+ @Id
+ private int id;
+
+ public CustomMappingPC()
+ {
+ }
+
+ public CustomMappingPC(int id)
+ {
+ this.id = id;
+ }
+
+
+ public boolean isFemale ()
+ {
+ return this.female;
+ }
+
+
+ public void setFemale (boolean female)
+ {
+ this.female = female;
+ }
+
+
+ public String getName ()
+ {
+ return this.name;
+ }
+
+
+ public void setName (String name)
+ {
+ this.name = name;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DFGTest.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+public class DFGTest {
+
+ private int dfgField;
+ private int nonDFGField;
+
+ public int getDFGField() {
+ return this.dfgField;
+ }
+
+ public void setDFGField(int dfgField) {
+ this.dfgField = dfgField;
+ }
+
+ public int getNonDFGField() {
+ return this.nonDFGField;
+ }
+
+ public void setNonDFGField(int nonDFGField) {
+ this.nonDFGField = nonDFGField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DataStoreTripsPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DataStoreTripsPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DataStoreTripsPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/DataStoreTripsPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,59 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import org.apache.openjpa.kernel.*;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.lang.annotation.Annotation;
+
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+public class DataStoreTripsPC {
+
+ private int intField;
+ private String stringField;
+
+ public DataStoreTripsPC() {
+ }
+
+ public DataStoreTripsPC(int i) {
+ this.intField = i;
+ }
+
+ public int getIntField() {
+ return this.intField;
+ }
+
+ public void setIntField(int intField) {
+ this.intField = intField;
+ }
+
+ public String getStringField() {
+ return this.stringField;
+ }
+
+ public void setStringField(String stringField) {
+ this.stringField = stringField;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,97 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+
+/**
+ * <p>Class that uses eager outer joins for its collection fields.</p>
+ *
+ * @author Abe White
+ */
+public class EagerOuterJoinPC {
+
+ private String name = null;
+ private Collection stringCollection = new HashSet();
+ private List stringList = new ArrayList();
+ private Collection oneManyCollection = new HashSet();
+ private Collection manyManyCollection = new HashSet();
+ private List manyManyList = new ArrayList();
+ private HelperPC helper = null;
+
+ public Collection getStringCollection() {
+ return this.stringCollection;
+ }
+
+ public void setStringCollection(Collection stringCollection) {
+ this.stringCollection = stringCollection;
+ }
+
+ public List getStringList() {
+ return this.stringList;
+ }
+
+ public void setStringList(List stringList) {
+ this.stringList = stringList;
+ }
+
+ public Collection getOneManyCollection() {
+ return this.oneManyCollection;
+ }
+
+ public void setOneManyCollection(Collection oneManyCollection) {
+ this.oneManyCollection = oneManyCollection;
+ }
+
+ public Collection getManyManyCollection() {
+ return this.manyManyCollection;
+ }
+
+ public void setManyManyCollection(Collection manyManyCollection) {
+ this.manyManyCollection = manyManyCollection;
+ }
+
+ public List getManyManyList() {
+ return this.manyManyList;
+ }
+
+ public void setManyManyList(List manyManyList) {
+ this.manyManyList = manyManyList;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String toString() {
+ return getClass().getName() + ": " + name;
+ }
+
+ public HelperPC getHelper() {
+ return this.helper;
+ }
+
+ public void setHelper(HelperPC helper) {
+ this.helper = helper;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC2.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC2.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerOuterJoinPC2.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,70 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+
+/**
+ * <p>Helper class in eager to-many join testing.</p>
+ *
+ * @author Abe White
+ */
+public class EagerOuterJoinPC2 {
+
+ private String name = null;
+ private EagerOuterJoinPC ref = null;
+ private HelperPC helper = null;
+ private Collection stringCollection = new HashSet();
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public EagerOuterJoinPC getRef() {
+ return this.ref;
+ }
+
+ public void setRef(EagerOuterJoinPC ref) {
+ this.ref = ref;
+ }
+
+ public String toString() {
+ return getClass().getName() + ": " + name;
+ }
+
+ public HelperPC getHelper() {
+ return this.helper;
+ }
+
+ public void setHelper(HelperPC helper) {
+ this.helper = helper;
+ }
+
+ public Collection getStringCollection() {
+ return this.stringCollection;
+ }
+
+ public void setStringCollection(Collection stringCollection) {
+ this.stringCollection = stringCollection;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPC.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,161 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+import javax.persistence.*;
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@Entity
+@Inheritance(strategy=InheritanceType.JOINED)
+public class EagerPC
+{
+ @Id
+ private int id;
+
+ @Column(name="strngfld", length=50)
+ private String stringField;
+
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private HelperPC eager;
+ @Column(name="eagsub")
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private HelperPC4 eagerSub;
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private HelperPC2 recurse;
+ @OneToOne(cascade={CascadeType.PERSIST, CascadeType.REMOVE})
+ private HelperPC helper;
+ @Transient private List eagerCollection = new LinkedList ();
+ @Transient private List recurseCollection = new LinkedList ();
+ @Transient private List helperCollection = new LinkedList ();
+
+ public EagerPC()
+ {}
+
+ public EagerPC(int id)
+ {
+ this.id = id;
+ }
+
+ public String getStringField ()
+ {
+ return this.stringField;
+ }
+
+ public void setStringField (String stringField)
+ {
+ this.stringField = stringField;
+ }
+
+
+ public HelperPC getEager ()
+ {
+ return this.eager;
+ }
+
+
+ public void setEager (HelperPC eager)
+ {
+ this.eager = eager;
+ }
+
+
+ public HelperPC2 getRecurse ()
+ {
+ return this.recurse;
+ }
+
+
+ public void setRecurse (HelperPC2 recurse)
+ {
+ this.recurse = recurse;
+ }
+
+
+ public HelperPC getHelper ()
+ {
+ return this.helper;
+ }
+
+
+ public void setHelper (HelperPC helper)
+ {
+ this.helper = helper;
+ }
+
+
+ public List getEagerCollection ()
+ {
+ return this.eagerCollection;
+ }
+
+
+ public void setEagerCollection (List eagerCollection)
+ {
+ this.eagerCollection = eagerCollection;
+ }
+
+
+ public List getRecurseCollection ()
+ {
+ return this.recurseCollection;
+ }
+
+
+ public void setRecurseCollection (List recurseCollection)
+ {
+ this.recurseCollection = recurseCollection;
+ }
+
+
+ public List getHelperCollection ()
+ {
+ return this.helperCollection;
+ }
+
+
+ public void setHelperCollection (List helperCollection)
+ {
+ this.helperCollection = helperCollection;
+ }
+
+
+ public HelperPC4 getEagerSub ()
+ {
+ return this.eagerSub;
+ }
+
+
+ public void setEagerSub (HelperPC4 eagerSub)
+ {
+ this.eagerSub = eagerSub;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+}
Added: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java?rev=627979&view=auto
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java (added)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/EagerPCSub.java Fri Feb 15 01:19:55 2008
@@ -0,0 +1,66 @@
+/*
+ * 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.openjpa.persistence.jdbc.common.apps;
+
+import java.util.*;
+import javax.persistence.*;
+
+/**
+ * <p>Persistent type used in testing.</p>
+ *
+ * @author Abe White
+ */
+@Entity
+public class EagerPCSub extends EagerPC
+{
+ private int intField;
+
+ @Column(name="eagercoll2")
+ @OneToMany
+ @Transient private List eagerCollection2 = new LinkedList ();
+
+ public EagerPCSub()
+ {
+ }
+
+ public EagerPCSub(int id)
+ {
+ super(id);
+ }
+
+ public int getIntField ()
+ {
+ return this.intField;
+ }
+
+ public void setIntField (int intField)
+ {
+ this.intField = intField;
+ }
+
+ public List getEagerCollection2 ()
+ {
+ return this.eagerCollection2;
+ }
+
+ public void setEagerCollection2 (List eagerCollection2)
+ {
+ this.eagerCollection2 = eagerCollection2;
+ }
+}