diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java new file mode 100644 index 000000000..80029c788 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java @@ -0,0 +1,283 @@ +/* + * 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.inheritance; + +import java.util.List; + +import javax.persistence.EntityManager; + +import org.apache.openjpa.persistence.inheritance.entities.EntityMapping; +import org.apache.openjpa.persistence.inheritance.entities.EntityMapping. + InheritanceEntityMapping; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; +import org.apache.openjpa.persistence.test.SingleEMFTestCase; + +public class TestInheritanceWithMSCID extends SingleEMFTestCase { + @SuppressWarnings("unchecked") + public void setUp() { + /* + * All entities used by this test are defined in the enumeration + * EntityMapping.InheritanceEntityMapping. + */ + EntityMapping.InheritanceEntityMapping[] entityClassEnums = + EntityMapping.InheritanceEntityMapping.values(); + + Class[] entityClassTypes = new Class[entityClassEnums.length]; + int idx = 0; + for (EntityMapping.InheritanceEntityMapping eEnum : entityClassEnums) { + entityClassTypes[idx] = eEnum.getEntityClass(); + idx++; + } + + setUp((Object[]) entityClassTypes); + } + + private InheritanceEntityMapping[][] allEntityGroups = { + EntityMapping.PIdJTIDMSC, + EntityMapping.PIdJTCDMSC, + EntityMapping.PIdJTSDMSC, + + EntityMapping.PIdSTIDMSC, + EntityMapping.PIdSTCDMSC, + EntityMapping.PIdSTSDMSC + }; + + /** + * Verifies that each entity type in the inheritance structure can be + * persisted. Entities are not cleared out of the persistence context + * (the L1 cache) when they are created. + */ + @SuppressWarnings("unchecked") + public void testPersistableWithEntitiesInL1Cache() { + EntityManager em = emf.createEntityManager(); + + for (InheritanceEntityMapping[] tEntities : allEntityGroups ) { + int idx = 0; + + try { + for (InheritanceEntityMapping tEntity : tEntities) { + RootEntity entity = (RootEntity) + EntityMapping.createEntityObjectInstance(tEntity); + entity.updateId(new Integer(idx++)); + entity.setRootEntityData("Root " + (idx - 1)); + + em.getTransaction().begin(); + em.persist(entity); + em.getTransaction().commit(); + } + } catch (Exception e) { + fail("Test failed with Exception\n" + e); + } + + List resultList = (List) em.createQuery( + "SELECT e FROM " + tEntities[0].getEntityName() + + " e ORDER BY e.id").getResultList(); + assertEquals(tEntities.length, resultList.size()); + + idx = 0; + for (Object obj : resultList) { + RootEntity entity = (RootEntity) obj; + Class actualType = entity.getClass(); + Class expectedType = + tEntities[idx].getEntityClass(); + + assertEquals( + "Assert Entity " + (idx + 1) + "is entity of type " + + expectedType, expectedType, actualType); + + idx++; + } + } + + em.close(); + } + + /** + * Verifies that each entity type in the inheritance structure can be + * persisted. Entities are cleared out of the persistence context + * (the L1 cache) after they are created. + */ + @SuppressWarnings("unchecked") + public void testPersistableWithEntitiesClearedFromL1Cache() { + EntityManager em = emf.createEntityManager(); + + for (InheritanceEntityMapping[] tEntities : allEntityGroups ) { + int idx = 0; + + try { + for (InheritanceEntityMapping tEntity : tEntities) { + RootEntity entity = (RootEntity) + EntityMapping.createEntityObjectInstance(tEntity); + entity.updateId(new Integer(idx++)); + entity.setRootEntityData("Root " + (idx - 1)); + + em.getTransaction().begin(); + em.persist(entity); + em.getTransaction().commit(); + em.clear(); + } + } catch (Exception e) { + fail("Test failed with Exception\n" + e); + } + + List resultList = (List) em.createQuery( + "SELECT e FROM " + tEntities[0].getEntityName() + + " e ORDER BY e.id").getResultList(); + assertEquals(tEntities.length, resultList.size()); + + idx = 0; + for (Object obj : resultList) { + RootEntity entity = (RootEntity) obj; + Class actualType = entity.getClass(); + Class expectedType = + tEntities[idx].getEntityClass(); + + assertEquals( + "Assert Entity " + (idx + 1) + "is entity of type " + + expectedType, expectedType, actualType); + + idx++; + } + } + + em.close(); + } + + + + /* + * The following tests exercise the following scenario: + * + * Verify that all-inclusive SELECT against an entity that is a member + * of an inheritance hierarchy will include all of its subclasses within + * the query results as well. + * + * Variations of this test include clearing the L1 cache after db + * population and between each Query check, and not clearing the L1 + * cache. + * + */ + + private boolean[][] queryLogic001AcceptenceMapping = new boolean[][] { + // RootEntity + new boolean[] { true, true, true, true, true, true, true, true, + true }, + // Leaf A + new boolean[] { false, true, false, false, false, false, false, + false, false }, + // EntityB + new boolean[] { false, false, true, true, true, false, false, + false, false }, + // Leaf B1 + new boolean[] { false, false, false, true, false, false, false, + false, false }, + // Leaf B2 + new boolean[] { false, false, false, false, true, false, false, + false, false }, + // Leaf C + new boolean[] { false, false, false, false, false, true, false, + false, false }, + // Entity D + new boolean[] { false, false, false, false, false, false, true, + true, true }, + // Leaf D1 + new boolean[] { false, false, false, false, false, false, false, + true, false }, + // Leaf D2 + new boolean[] { false, false, false, false, false, false, false, + false, true } }; + + @SuppressWarnings("unchecked") + private void query001TestLogic(boolean clearL1Cache) { + EntityManager em = emf.createEntityManager(); + + boolean[][] acceptenceMapping = queryLogic001AcceptenceMapping; + + for (InheritanceEntityMapping[] tEntities : allEntityGroups ) { + // Populate Database + int idx = 0; + try { + for (InheritanceEntityMapping tEntity : tEntities) { + RootEntity entity = (RootEntity) + EntityMapping.createEntityObjectInstance(tEntity); + entity.updateId(new Integer(idx++)); + entity.setRootEntityData("Root " + (idx - 1)); + + em.getTransaction().begin(); + em.persist(entity); + em.getTransaction().commit(); + + if (clearL1Cache) + em.clear(); + } + } catch (Exception e) { + fail("Test failed with Exception\n" + e); + } + + // Run through acceptance tests + idx = 0; + for (boolean[] acceptenceMap : acceptenceMapping) { + int expectedQueryResultListSize = 0; + for (boolean acceptence : acceptenceMap) { + if (acceptence) + expectedQueryResultListSize++; + } + String queryStr = "SELECT e FROM " + + tEntities[idx].getEntityName() + " e"; + List resultList = (List) + em.createQuery(queryStr).getResultList(); + + assertEquals( + "Assert the following query creates a result list " + + "with " + expectedQueryResultListSize + " entities: " + + "\"" + queryStr + "\". ", + expectedQueryResultListSize, + resultList.size()); + idx++; + + if (clearL1Cache) + em.clear(); + } + } + + em.close(); + } + + /** + * Verify that all-inclusive SELECT against an entity that is a member of an + * inheritance hierarchy will include all of its subclasses within the query + * results as well. Test will not clear the L1 cache after populating DB + * and will not clear the L1 cache in between Query executions. + */ + public void testQuery001WithL1() { + query001TestLogic(false); + } + + /** + * Verify that all-inclusive SELECT against an entity that is a member of an + * inheritance hierarchy will include all of its subclasses within the query + * results as well. Test will clear the L1 cache after populating DB + * and will clear the L1 cache in between Query executions. + */ + public void testQuery001NoL1() { + query001TestLogic(true); + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java new file mode 100644 index 000000000..6e5df22af --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java @@ -0,0 +1,108 @@ +/* + * 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.inheritance; + +import javax.persistence.EntityManager; + +import org.apache.openjpa.persistence.inheritance.entity.BaseClass; +import org.apache.openjpa.persistence.inheritance.entity.MappedSuper; +import org.apache.openjpa.persistence.inheritance.entity.SubclassC; +import org.apache.openjpa.persistence.inheritance.entity.SubclassD; +import org.apache.openjpa.persistence.test.SingleEMFTestCase; + +/** + * This test verifies basic Mapped Superclass functionality as dictated by + * the JPA Specification contract. + * + * OpenJPA JIRA: {@link http://issues.apache.org/jira/browse/OPENJPA-1061} + * + */ +public class TestMappedSuperclass extends SingleEMFTestCase { + public void setUp() { + setUp(BaseClass.class, SubclassC.class, MappedSuper.class, + SubclassD.class); + } + + private Class[] classArray(Class... classes) { + return classes; + } + + /** + * Verify that two entity classes, extending a Mapped Superclass that + * defines an ID field, are not members of a common inheritance + * hierarchy. This test variant inserts new entities into the persistence + * context by calling EntityManager.persist() on the new entity object. + */ + public void testMappedSuperclassContract001() { + EntityManager em = emf.createEntityManager(); + + // Create two entities, SubclassC and SubclassD, with the same + // primary key value + SubclassC sc = new SubclassC(); + sc.setId(42); + sc.setName("SubclassCMappedSuperName"); + sc.setClassCName("SubclassCName"); + + em.getTransaction().begin(); + em.persist(sc); + em.getTransaction().commit(); + + SubclassD sd = new SubclassD(); + sd.setId(42); + sd.setName("SubclassDMappedSuperName"); + sd.setClassDName("SubclassDName"); + + // No EntityExistsException should be thrown by the persist + em.getTransaction().begin(); + em.persist(sd); + em.getTransaction().commit(); + } + + /** + * Verify that two entity classes, extending a Mapped Superclass that + * defines an ID field, are not members of a common inheritance + * hierarchy. This test variant inserts new entities into the persistence + * context by calling EntityManager.merge() on the new entity object. + */ + public void testMappedSuperclassContract002() { + EntityManager em = emf.createEntityManager(); + + // Create two entities, SubclassC and SubclassD, with the same + // primary key value + + SubclassC sc = new SubclassC(); + sc.setId(43); + sc.setName("SubclassCMappedSuperName"); + sc.setClassCName("SubclassCName"); + + em.getTransaction().begin(); + em.merge(sc); + em.getTransaction().commit(); + + SubclassD sd = new SubclassD(); + sd.setId(43); + sd.setName("SubclassDMappedSuperName"); + sd.setClassDName("SubclassDName"); + + // No EntityExistsException should be thrown by the merge + em.getTransaction().begin(); + em.merge(sd); + em.getTransaction().commit(); + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java new file mode 100644 index 000000000..b67b8197e --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java @@ -0,0 +1,559 @@ +package org.apache.openjpa.persistence.inheritance.entities; + +import java.lang.reflect.Constructor; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.chardiscriminator.PIdJTCDMSCRootEntity; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.intdiscriminator.PIdJTIDMSCRootEntity; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.jointable.stringdiscriminator.PIdJTSDMSCRootEntity; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.chardiscriminator.PIdSTCDMSCRootEntity; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator.PIdSTIDMSCRootEntity; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCEntityB; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCEntityD; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafA; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafB1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafB2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafC; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafD1; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCLeafD2; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator.PIdSTSDMSCRootEntity; + +public class EntityMapping { + @SuppressWarnings("unchecked") + public static enum InheritanceEntityMapping { + /* + * Primitive Identity defined on a Mapped Superclass, + * Joined Table Entity Inheritance + */ + + // Primitive Identity defined on a Mapped Superclass, + // Joined Table Entity Inheritance, Integer Discriminator + PIdJTIDMSCRootEntity { + public Class getEntityClass() { + return PIdJTIDMSCRootEntity.class; + } + }, + PIdJTIDMSCLeafA { + public Class getEntityClass() { + return PIdJTIDMSCLeafA.class; + } + }, + PIdJTIDMSCEntityB { + public Class getEntityClass() { + return PIdJTIDMSCEntityB.class; + } + }, + PIdJTIDMSCLeafB1 { + public Class getEntityClass() { + return PIdJTIDMSCLeafB1.class; + } + }, + PIdJTIDMSCLeafB2 { + public Class getEntityClass() { + return PIdJTIDMSCLeafB2.class; + } + }, + PIdJTIDMSCLeafC { + public Class getEntityClass() { + return PIdJTIDMSCLeafC.class; + } + }, + PIdJTIDMSCEntityD { + public Class getEntityClass() { + return PIdJTIDMSCEntityD.class; + } + }, + PIdJTIDMSCLeafD1 { + public Class getEntityClass() { + return PIdJTIDMSCLeafD1.class; + } + }, + PIdJTIDMSCLeafD2 { + public Class getEntityClass() { + return PIdJTIDMSCLeafD2.class; + } + }, + + // Primitive Identity defined on a Mapped Superclass, + // Joined Table Entity Inheritance, Char Discriminator + PIdJTCDMSCRootEntity { + public Class getEntityClass() { + return PIdJTCDMSCRootEntity.class; + } + }, + PIdJTCDMSCLeafA { + public Class getEntityClass() { + return PIdJTCDMSCLeafA.class; + } + }, + PIdJTCDMSCEntityB { + public Class getEntityClass() { + return PIdJTCDMSCEntityB.class; + } + }, + PIdJTCDMSCLeafB1 { + public Class getEntityClass() { + return PIdJTCDMSCLeafB1.class; + } + }, + PIdJTCDMSCLeafB2 { + public Class getEntityClass() { + return PIdJTCDMSCLeafB2.class; + } + }, + PIdJTCDMSCLeafC { + public Class getEntityClass() { + return PIdJTCDMSCLeafC.class; + } + }, + PIdJTCDMSCEntityD { + public Class getEntityClass() { + return PIdJTCDMSCEntityD.class; + } + }, + PIdJTCDMSCLeafD1 { + public Class getEntityClass() { + return PIdJTCDMSCLeafD1.class; + } + }, + PIdJTCDMSCLeafD2 { + public Class getEntityClass() { + return PIdJTCDMSCLeafD2.class; + } + }, + + // Primitive Identity defined on a Mapped Superclass, + // Joined Table Entity Inheritance, String Discriminator + PIdJTSDMSCRootEntity { + public Class getEntityClass() { + return PIdJTSDMSCRootEntity.class; + } + }, + PIdJTSDMSCLeafA { + public Class getEntityClass() { + return PIdJTSDMSCLeafA.class; + } + }, + PIdJTSDMSCEntityB { + public Class getEntityClass() { + return PIdJTSDMSCEntityB.class; + } + }, + PIdJTSDMSCLeafB1 { + public Class getEntityClass() { + return PIdJTSDMSCLeafB1.class; + } + }, + PIdJTSDMSCLeafB2 { + public Class getEntityClass() { + return PIdJTSDMSCLeafB2.class; + } + }, + PIdJTSDMSCLeafC { + public Class getEntityClass() { + return PIdJTSDMSCLeafC.class; + } + }, + PIdJTSDMSCEntityD { + public Class getEntityClass() { + return PIdJTSDMSCEntityD.class; + } + }, + PIdJTSDMSCLeafD1 { + public Class getEntityClass() { + return PIdJTSDMSCLeafD1.class; + } + }, + PIdJTSDMSCLeafD2 { + public Class getEntityClass() { + return PIdJTSDMSCLeafD2.class; + } + }, + + /* + * Primitive Identity defined on a Mapped Superclass, + * Single Table Entity Inheritance + */ + + // Primitive Identity defined on a Mapped Superclass, + // Single Table Entity Inheritance, Integer Discriminator + PIdSTIDMSCRootEntity { + public Class getEntityClass() { + return PIdSTIDMSCRootEntity.class; + } + }, + PIdSTIDMSCLeafA { + public Class getEntityClass() { + return PIdSTIDMSCLeafA.class; + } + }, + PIdSTIDMSCEntityB { + public Class getEntityClass() { + return PIdSTIDMSCEntityB.class; + } + }, + PIdSTIDMSCLeafB1 { + public Class getEntityClass() { + return PIdSTIDMSCLeafB1.class; + } + }, + PIdSTIDMSCLeafB2 { + public Class getEntityClass() { + return PIdSTIDMSCLeafB2.class; + } + }, + PIdSTIDMSCLeafC { + public Class getEntityClass() { + return PIdSTIDMSCLeafC.class; + } + }, + PIdSTIDMSCEntityD { + public Class getEntityClass() { + return PIdSTIDMSCEntityD.class; + } + }, + PIdSTIDMSCLeafD1 { + public Class getEntityClass() { + return PIdSTIDMSCLeafD1.class; + } + }, + PIdSTIDMSCLeafD2 { + public Class getEntityClass() { + return PIdSTIDMSCLeafD2.class; + } + }, + + // Primitive Identity defined on a Mapped Superclass, + // Single Table Entity Inheritance, Char Discriminator + PIdSTCDMSCRootEntity { + public Class getEntityClass() { + return PIdSTCDMSCRootEntity.class; + } + }, + PIdSTCDMSCLeafA { + public Class getEntityClass() { + return PIdSTCDMSCLeafA.class; + } + }, + PIdSTCDMSCEntityB { + public Class getEntityClass() { + return PIdSTCDMSCEntityB.class; + } + }, + PIdSTCDMSCLeafB1 { + public Class getEntityClass() { + return PIdSTCDMSCLeafB1.class; + } + }, + PIdSTCDMSCLeafB2 { + public Class getEntityClass() { + return PIdSTCDMSCLeafB2.class; + } + }, + PIdSTCDMSCLeafC { + public Class getEntityClass() { + return PIdSTCDMSCLeafC.class; + } + }, + PIdSTCDMSCEntityD { + public Class getEntityClass() { + return PIdSTCDMSCEntityD.class; + } + }, + PIdSTCDMSCLeafD1 { + public Class getEntityClass() { + return PIdSTCDMSCLeafD1.class; + } + }, + PIdSTCDMSCLeafD2 { + public Class getEntityClass() { + return PIdSTCDMSCLeafD2.class; + } + }, + + // Primitive Identity defined on a Mapped Superclass, + // Single Table Entity Inheritance, String Discriminator + PIdSTSDMSCRootEntity { + public Class getEntityClass() { + return PIdSTSDMSCRootEntity.class; + } + }, + PIdSTSDMSCLeafA { + public Class getEntityClass() { + return PIdSTSDMSCLeafA.class; + } + }, + PIdSTSDMSCEntityB { + public Class getEntityClass() { + return PIdSTSDMSCEntityB.class; + } + }, + PIdSTSDMSCLeafB1 { + public Class getEntityClass() { + return PIdSTSDMSCLeafB1.class; + } + }, + PIdSTSDMSCLeafB2 { + public Class getEntityClass() { + return PIdSTSDMSCLeafB2.class; + } + }, + PIdSTSDMSCLeafC { + public Class getEntityClass() { + return PIdSTSDMSCLeafC.class; + } + }, + PIdSTSDMSCEntityD { + public Class getEntityClass() { + return PIdSTSDMSCEntityD.class; + } + }, + PIdSTSDMSCLeafD1 { + public Class getEntityClass() { + return PIdSTSDMSCLeafD1.class; + } + }, + PIdSTSDMSCLeafD2 { + public Class getEntityClass() { + return PIdSTSDMSCLeafD2.class; + } + }, + + + /* + * Non Entity PC-Aware Types + */ + PrimitiveIDMappedSuperclass { + public Class getEntityClass() { + return PrimitiveIDMappedSuperclass.class; + } + }, + PIdJTIDMSCMappedSuperclass { + public Class getEntityClass() { + return PIdJTIDMSCMappedSuperclass.class; + } + }, + PIdJTICMSCMappedSuperclass { + public Class getEntityClass() { + return PIdJTCDMSCMappedSuperclass.class; + } + }, + PIdJTISMSCMappedSuperclass { + public Class getEntityClass() { + return PIdJTSDMSCMappedSuperclass.class; + } + }, + PIdSTIDMSCMappedSuperclass { + public Class getEntityClass() { + return PIdSTIDMSCMappedSuperclass.class; + } + }, + PIdSTICMSCMappedSuperclass { + public Class getEntityClass() { + return PIdSTCDMSCMappedSuperclass.class; + } + }, + PIdSTISMSCMappedSuperclass { + public Class getEntityClass() { + return PIdSTSDMSCMappedSuperclass.class; + } + } + + ; + + public abstract Class getEntityClass(); + public String getEntityName() { + return getEntityClass().getSimpleName(); + } + }; + + public final static InheritanceEntityMapping[] PIdJTIDMSC = { + InheritanceEntityMapping.PIdJTIDMSCRootEntity, + InheritanceEntityMapping.PIdJTIDMSCLeafA, + InheritanceEntityMapping.PIdJTIDMSCEntityB, + InheritanceEntityMapping.PIdJTIDMSCLeafB1, + InheritanceEntityMapping.PIdJTIDMSCLeafB2, + InheritanceEntityMapping.PIdJTIDMSCLeafC, + InheritanceEntityMapping.PIdJTIDMSCEntityD, + InheritanceEntityMapping.PIdJTIDMSCLeafD1, + InheritanceEntityMapping.PIdJTIDMSCLeafD2 + }; + + public final static InheritanceEntityMapping[] PIdJTCDMSC = { + InheritanceEntityMapping.PIdJTCDMSCRootEntity, + InheritanceEntityMapping.PIdJTCDMSCLeafA, + InheritanceEntityMapping.PIdJTCDMSCEntityB, + InheritanceEntityMapping.PIdJTCDMSCLeafB1, + InheritanceEntityMapping.PIdJTCDMSCLeafB2, + InheritanceEntityMapping.PIdJTCDMSCLeafC, + InheritanceEntityMapping.PIdJTCDMSCEntityD, + InheritanceEntityMapping.PIdJTCDMSCLeafD1, + InheritanceEntityMapping.PIdJTCDMSCLeafD2 + }; + + public final static InheritanceEntityMapping[] PIdJTSDMSC = { + InheritanceEntityMapping.PIdJTSDMSCRootEntity, + InheritanceEntityMapping.PIdJTSDMSCLeafA, + InheritanceEntityMapping.PIdJTSDMSCEntityB, + InheritanceEntityMapping.PIdJTSDMSCLeafB1, + InheritanceEntityMapping.PIdJTSDMSCLeafB2, + InheritanceEntityMapping.PIdJTSDMSCLeafC, + InheritanceEntityMapping.PIdJTSDMSCEntityD, + InheritanceEntityMapping.PIdJTSDMSCLeafD1, + InheritanceEntityMapping.PIdJTSDMSCLeafD2 + }; + + public final static InheritanceEntityMapping[] PIdSTIDMSC = { + InheritanceEntityMapping.PIdSTIDMSCRootEntity, + InheritanceEntityMapping.PIdSTIDMSCLeafA, + InheritanceEntityMapping.PIdSTIDMSCEntityB, + InheritanceEntityMapping.PIdSTIDMSCLeafB1, + InheritanceEntityMapping.PIdSTIDMSCLeafB2, + InheritanceEntityMapping.PIdSTIDMSCLeafC, + InheritanceEntityMapping.PIdSTIDMSCEntityD, + InheritanceEntityMapping.PIdSTIDMSCLeafD1, + InheritanceEntityMapping.PIdSTIDMSCLeafD2 + }; + + public final static InheritanceEntityMapping[] PIdSTCDMSC = { + InheritanceEntityMapping.PIdSTCDMSCRootEntity, + InheritanceEntityMapping.PIdSTCDMSCLeafA, + InheritanceEntityMapping.PIdSTCDMSCEntityB, + InheritanceEntityMapping.PIdSTCDMSCLeafB1, + InheritanceEntityMapping.PIdSTCDMSCLeafB2, + InheritanceEntityMapping.PIdSTCDMSCLeafC, + InheritanceEntityMapping.PIdSTCDMSCEntityD, + InheritanceEntityMapping.PIdSTCDMSCLeafD1, + InheritanceEntityMapping.PIdSTCDMSCLeafD2 + }; + + public final static InheritanceEntityMapping[] PIdSTSDMSC = { + InheritanceEntityMapping.PIdSTSDMSCRootEntity, + InheritanceEntityMapping.PIdSTSDMSCLeafA, + InheritanceEntityMapping.PIdSTSDMSCEntityB, + InheritanceEntityMapping.PIdSTSDMSCLeafB1, + InheritanceEntityMapping.PIdSTSDMSCLeafB2, + InheritanceEntityMapping.PIdSTSDMSCLeafC, + InheritanceEntityMapping.PIdSTSDMSCEntityD, + InheritanceEntityMapping.PIdSTSDMSCLeafD1, + InheritanceEntityMapping.PIdSTSDMSCLeafD2 + }; + + + @SuppressWarnings("unchecked") + public static Object createEntityObjectInstance( + InheritanceEntityMapping eType) throws Exception { + Class eClassType = eType.getEntityClass(); + + Constructor c = eClassType.getConstructor(new Class[] {}); + Object eObj = c.newInstance(new Object[] {}); + return eObj; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java new file mode 100644 index 000000000..81f445db3 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java @@ -0,0 +1,49 @@ +/* + * 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.inheritance.entities.idmsc; + +import javax.persistence.Id; +import javax.persistence.MappedSuperclass; + +/** + * Mapped Superclass defining an integer-type primary key field. + * + */ +@MappedSuperclass +public abstract class PrimitiveIDMappedSuperclass { + @Id + private int id; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public Object fetchId() { + return new Integer(getId()); + } + + public void updateId(Object obj) { + Integer i = (Integer) obj; + setId(i.intValue()); + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityB.java new file mode 100644 index 000000000..d46f74dda --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("C") +public class PIdJTCDMSCEntityB +extends PIdJTCDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityD.java new file mode 100644 index 000000000..1cddc7736 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("G") +public class PIdJTCDMSCEntityD +extends PIdJTCDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafA.java new file mode 100644 index 000000000..6796d8ff7 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("B") +public class PIdJTCDMSCLeafA +extends PIdJTCDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java new file mode 100644 index 000000000..269ab2ebb --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("D") +public class PIdJTCDMSCLeafB1 +extends PIdJTCDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java new file mode 100644 index 000000000..bb7c3a11d --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("E") +public class PIdJTCDMSCLeafB2 +extends PIdJTCDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafC.java new file mode 100644 index 000000000..b3eda100d --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("F") +public class PIdJTCDMSCLeafC +extends PIdJTCDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java new file mode 100644 index 000000000..c76a667e1 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("H") +public class PIdJTCDMSCLeafD1 +extends PIdJTCDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java new file mode 100644 index 000000000..a259099b9 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("I") +public class PIdJTCDMSCLeafD2 +extends PIdJTCDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCMappedSuperclass.java new file mode 100644 index 000000000..71749061d --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdJTCDMSCMappedSuperclass +extends PIdJTCDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCRootEntity.java new file mode 100644 index 000000000..043272f03 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.chardiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.JOINED) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.CHAR) +@DiscriminatorValue("A") +public class PIdJTCDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityB.java new file mode 100644 index 000000000..f1aa59727 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("3") +public class PIdJTIDMSCEntityB +extends PIdJTIDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityD.java new file mode 100644 index 000000000..0ed8bd5e1 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("7") +public class PIdJTIDMSCEntityD +extends PIdJTIDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafA.java new file mode 100644 index 000000000..df88f1ddb --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("2") +public class PIdJTIDMSCLeafA +extends PIdJTIDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB1.java new file mode 100644 index 000000000..d1b012713 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("4") +public class PIdJTIDMSCLeafB1 +extends PIdJTIDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB2.java new file mode 100644 index 000000000..fbb4c2d63 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("5") +public class PIdJTIDMSCLeafB2 +extends PIdJTIDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafC.java new file mode 100644 index 000000000..ab711fda3 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("6") +public class PIdJTIDMSCLeafC +extends PIdJTIDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD1.java new file mode 100644 index 000000000..f8fc35024 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("8") +public class PIdJTIDMSCLeafD1 +extends PIdJTIDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD2.java new file mode 100644 index 000000000..74a796af2 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("9") +public class PIdJTIDMSCLeafD2 +extends PIdJTIDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCMappedSuperclass.java new file mode 100644 index 000000000..3f98c625d --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdJTIDMSCMappedSuperclass +extends PIdJTIDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCRootEntity.java new file mode 100644 index 000000000..262b50390 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.intdiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.JOINED) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.INTEGER) +@DiscriminatorValue("1") +public class PIdJTIDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityB.java new file mode 100644 index 000000000..eeaf2d49c --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("StrC") +public class PIdJTSDMSCEntityB +extends PIdJTSDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityD.java new file mode 100644 index 000000000..c28e9a652 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("StrG") +public class PIdJTSDMSCEntityD +extends PIdJTSDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafA.java new file mode 100644 index 000000000..c987a4781 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("StrB") +public class PIdJTSDMSCLeafA +extends PIdJTSDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB1.java new file mode 100644 index 000000000..dd4f48f3f --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("StrD") +public class PIdJTSDMSCLeafB1 +extends PIdJTSDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB2.java new file mode 100644 index 000000000..207903835 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("StrE") +public class PIdJTSDMSCLeafB2 +extends PIdJTSDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafC.java new file mode 100644 index 000000000..e2b5b9613 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("StrF") +public class PIdJTSDMSCLeafC +extends PIdJTSDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD1.java new file mode 100644 index 000000000..bb21f5607 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("StrH") +public class PIdJTSDMSCLeafD1 +extends PIdJTSDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD2.java new file mode 100644 index 000000000..989ab7db5 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("StrI") +public class PIdJTSDMSCLeafD2 +extends PIdJTSDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCMappedSuperclass.java new file mode 100644 index 000000000..af981bfb1 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdJTSDMSCMappedSuperclass +extends PIdJTSDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCRootEntity.java new file mode 100644 index 000000000..0eb40fce7 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.jointable.stringdiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.JOINED) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING) +@DiscriminatorValue("StrA") +public class PIdJTSDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityB.java new file mode 100644 index 000000000..2edbe0403 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("C") +public class PIdSTCDMSCEntityB +extends PIdSTCDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityD.java new file mode 100644 index 000000000..f27f2e8ac --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("G") +public class PIdSTCDMSCEntityD +extends PIdSTCDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafA.java new file mode 100644 index 000000000..49922316e --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("B") +public class PIdSTCDMSCLeafA +extends PIdSTCDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB1.java new file mode 100644 index 000000000..edaca7f70 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("D") +public class PIdSTCDMSCLeafB1 +extends PIdSTCDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB2.java new file mode 100644 index 000000000..cfe28e684 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("E") +public class PIdSTCDMSCLeafB2 +extends PIdSTCDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafC.java new file mode 100644 index 000000000..0c46e45b3 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("F") +public class PIdSTCDMSCLeafC +extends PIdSTCDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD1.java new file mode 100644 index 000000000..68fbe80a0 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("H") +public class PIdSTCDMSCLeafD1 +extends PIdSTCDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD2.java new file mode 100644 index 000000000..45813b084 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("I") +public class PIdSTCDMSCLeafD2 +extends PIdSTCDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCMappedSuperclass.java new file mode 100644 index 000000000..4300029ea --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdSTCDMSCMappedSuperclass +extends PIdSTCDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCRootEntity.java new file mode 100644 index 000000000..4876a1e1a --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. +primitiveidentity.singletable.chardiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.SINGLE_TABLE) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.CHAR) +@DiscriminatorValue("A") +public class PIdSTCDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityB.java new file mode 100644 index 000000000..cdb57cca8 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("3") +public class PIdSTIDMSCEntityB +extends PIdSTIDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityD.java new file mode 100644 index 000000000..73b8f1ca4 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("7") +public class PIdSTIDMSCEntityD +extends PIdSTIDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafA.java new file mode 100644 index 000000000..7d21cc241 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("2") +public class PIdSTIDMSCLeafA +extends PIdSTIDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB1.java new file mode 100644 index 000000000..264829fed --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("4") +public class PIdSTIDMSCLeafB1 +extends PIdSTIDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB2.java new file mode 100644 index 000000000..a7a58b74e --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("5") +public class PIdSTIDMSCLeafB2 +extends PIdSTIDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafC.java new file mode 100644 index 000000000..505ac4954 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("6") +public class PIdSTIDMSCLeafC +extends PIdSTIDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD1.java new file mode 100644 index 000000000..c5faec127 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("8") +public class PIdSTIDMSCLeafD1 +extends PIdSTIDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD2.java new file mode 100644 index 000000000..ba3d3ffee --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("9") +public class PIdSTIDMSCLeafD2 +extends PIdSTIDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCMappedSuperclass.java new file mode 100644 index 000000000..c3ec42cc2 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdSTIDMSCMappedSuperclass +extends PIdSTIDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCRootEntity.java new file mode 100644 index 000000000..507b5e784 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.intdiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.SINGLE_TABLE) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.INTEGER) +@DiscriminatorValue("1") +public class PIdSTIDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityB.java new file mode 100644 index 000000000..d7c78ccc9 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityB.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityB; + +@Entity +@DiscriminatorValue("StrC") +public class PIdSTSDMSCEntityB +extends PIdSTSDMSCRootEntity implements EntityB { + private String entityBData; + + public String getEntityBData() { + return entityBData; + } + public void setEntityBData(String entityBData) { + this.entityBData = entityBData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityD.java new file mode 100644 index 000000000..b7f06466a --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityD.java @@ -0,0 +1,40 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + EntityD; +@Entity +@DiscriminatorValue("StrG") +public class PIdSTSDMSCEntityD +extends PIdSTSDMSCMappedSuperclass implements EntityD { +private String entityDData; + + public String getEntityDData() { + return entityDData; + } + public void setEntityDData(String entityDData) { + this.entityDData = entityDData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafA.java new file mode 100644 index 000000000..88fff818d --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafA.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafA; + +@Entity +@DiscriminatorValue("StrB") +public class PIdSTSDMSCLeafA +extends PIdSTSDMSCRootEntity implements LeafA { + private String leafAData; + + public String getLeafAData() + { + return leafAData; + } + + public void setLeafAData(String leafAData) { + this.leafAData = leafAData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB1.java new file mode 100644 index 000000000..6b54e698a --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB1; + +@Entity +@DiscriminatorValue("StrD") +public class PIdSTSDMSCLeafB1 +extends PIdSTSDMSCEntityB implements LeafB1 { + private String leafB1Data; + + public String getLeafB1Data() { + return leafB1Data; + } + public void setLeafB1Data(String leafB1Data) { + this.leafB1Data = leafB1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB2.java new file mode 100644 index 000000000..403048f86 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafB2; + +@Entity +@DiscriminatorValue("StrE") +public class PIdSTSDMSCLeafB2 +extends PIdSTSDMSCEntityB implements LeafB2 { +private String leafB2Data; + + public String getLeafB2Data() { + return leafB2Data; + } + public void setLeafB2Data(String leafB2Data) { + this.leafB2Data = leafB2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafC.java new file mode 100644 index 000000000..75282a9de --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafC.java @@ -0,0 +1,42 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.LeafC; + +@Entity +@DiscriminatorValue("StrF") +public class PIdSTSDMSCLeafC +extends PIdSTSDMSCMappedSuperclass implements LeafC { + private String leafCData; + + public String getLeafCData() + { + return leafCData; + } + + public void setLeafCData(String leafCData) { + this.leafCData = leafCData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD1.java new file mode 100644 index 000000000..4f3ba6af8 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD1.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD1; + +@Entity +@DiscriminatorValue("StrH") +public class PIdSTSDMSCLeafD1 +extends PIdSTSDMSCEntityD implements LeafD1 { + private String leafD1Data; + + public String getLeafD1Data() { + return leafD1Data; + } + public void setLeafD1Data(String leafD1Data) { + this.leafD1Data = leafD1Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD2.java new file mode 100644 index 000000000..624151f06 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD2.java @@ -0,0 +1,41 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + LeafD2; + +@Entity +@DiscriminatorValue("StrI") +public class PIdSTSDMSCLeafD2 +extends PIdSTSDMSCEntityD implements LeafD2 { + private String leafD2Data; + + public String getLeafD2Data() { + return leafD2Data; + } + public void setLeafD2Data(String leafD2Data) { + this.leafD2Data = leafD2Data; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCMappedSuperclass.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCMappedSuperclass.java new file mode 100644 index 000000000..3751719f7 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCMappedSuperclass.java @@ -0,0 +1,39 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.MappedSuperclass; + +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces.MSC; + +@MappedSuperclass +public class PIdSTSDMSCMappedSuperclass +extends PIdSTSDMSCRootEntity implements MSC { + private String mappedSuperclassData; + + public String getMappedSuperclassData() { + return mappedSuperclassData; + } + + public void setMappedSuperclassData(String mappedSuperclassData) { + this.mappedSuperclassData = mappedSuperclassData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCRootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCRootEntity.java new file mode 100644 index 000000000..5850d3253 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCRootEntity.java @@ -0,0 +1,48 @@ +/* + * 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.inheritance.entities.idmsc. + primitiveidentity.singletable.stringdiscriminator; + +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.DiscriminatorValue; +import javax.persistence.Entity; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; + +import org.apache.openjpa.persistence.inheritance.entities.idmsc. + PrimitiveIDMappedSuperclass; +import org.apache.openjpa.persistence.inheritance.entities.testinterfaces. + RootEntity; + +@Entity +@Inheritance(strategy=InheritanceType.SINGLE_TABLE) +@DiscriminatorColumn(name="TYPE", discriminatorType=DiscriminatorType.STRING) +@DiscriminatorValue("StrA") +public class PIdSTSDMSCRootEntity + extends PrimitiveIDMappedSuperclass implements RootEntity { + private String rootEntityData; + + public String getRootEntityData() { + return rootEntityData; + } + public void setRootEntityData(String rootEntityData) { + this.rootEntityData = rootEntityData; + } +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityB.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityB.java new file mode 100644 index 000000000..5dcb57e5f --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityB.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface EntityB extends RootEntity { + public String getEntityBData(); + public void setEntityBData(String entityBData); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityD.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityD.java new file mode 100644 index 000000000..f3a5e4e18 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityD.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface EntityD { + public String getEntityDData(); + public void setEntityDData(String entityDData); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafA.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafA.java new file mode 100644 index 000000000..4f8e32687 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafA.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafA extends RootEntity { + public String getLeafAData(); + public void setLeafAData(String leafAData); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB1.java new file mode 100644 index 000000000..4d41bbeec --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB1.java @@ -0,0 +1,26 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafB1 extends EntityB { + public String getLeafB1Data(); + + public void setLeafB1Data(String leafB1Data); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB2.java new file mode 100644 index 000000000..8e16582f0 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB2.java @@ -0,0 +1,26 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafB2 { + public String getLeafB2Data(); + + public void setLeafB2Data(String leafB2Data); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafC.java new file mode 100644 index 000000000..8cf612480 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafC.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafC { + public String getLeafCData(); + public void setLeafCData(String leafCData); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD1.java new file mode 100644 index 000000000..8072af4d2 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD1.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafD1 { + public String getLeafD1Data(); + public void setLeafD1Data(String leafD1Data); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD2.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD2.java new file mode 100644 index 000000000..3218e05d2 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD2.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface LeafD2 { + public String getLeafD2Data(); + public void setLeafD2Data(String leafD2Data); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/MSC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/MSC.java new file mode 100644 index 000000000..a49c07cba --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/MSC.java @@ -0,0 +1,25 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface MSC { + public String getMappedSuperclassData(); + public void setMappedSuperclassData(String mappedSuperclassData); +} diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/RootEntity.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/RootEntity.java new file mode 100644 index 000000000..22801d784 --- /dev/null +++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/RootEntity.java @@ -0,0 +1,28 @@ +/* + * 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.inheritance.entities.testinterfaces; + +public interface RootEntity { + public Object fetchId(); + public void updateId(Object obj); + + public String getRootEntityData(); + public void setRootEntityData(String rootEntityData); +}