mirror of https://github.com/apache/openjpa.git
OPENJPA-1061 committing patch from Jody Grassel.
modified: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java modified: openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/chardiscriminator/PIdJTCDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/intdiscriminator/PIdJTIDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/jointable/stringdiscriminator/PIdJTSDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/chardiscriminator/PIdSTCDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/intdiscriminator/PIdSTIDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCEntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCLeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCMappedSuperclass.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/primitiveidentity/singletable/stringdiscriminator/PIdSTSDMSCRootEntity.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityB.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityD.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafA.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD1.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD2.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/MSC.java new file: openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/RootEntity.java modified: openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java modified: openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Conflicts: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@789518 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
de7f5c1189
commit
1fce44737b
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance
TestInheritanceWithMSCID.javaTestMappedSuperclass.java
entities
EntityMapping.java
idmsc
PrimitiveIDMappedSuperclass.java
primitiveidentity
jointable
chardiscriminator
PIdJTCDMSCEntityB.javaPIdJTCDMSCEntityD.javaPIdJTCDMSCLeafA.javaPIdJTCDMSCLeafB1.javaPIdJTCDMSCLeafB2.javaPIdJTCDMSCLeafC.javaPIdJTCDMSCLeafD1.javaPIdJTCDMSCLeafD2.javaPIdJTCDMSCMappedSuperclass.javaPIdJTCDMSCRootEntity.java
intdiscriminator
PIdJTIDMSCEntityB.javaPIdJTIDMSCEntityD.javaPIdJTIDMSCLeafA.javaPIdJTIDMSCLeafB1.javaPIdJTIDMSCLeafB2.javaPIdJTIDMSCLeafC.javaPIdJTIDMSCLeafD1.javaPIdJTIDMSCLeafD2.javaPIdJTIDMSCMappedSuperclass.javaPIdJTIDMSCRootEntity.java
stringdiscriminator
singletable
chardiscriminator
PIdSTCDMSCEntityB.javaPIdSTCDMSCEntityD.javaPIdSTCDMSCLeafA.javaPIdSTCDMSCLeafB1.javaPIdSTCDMSCLeafB2.javaPIdSTCDMSCLeafC.javaPIdSTCDMSCLeafD1.javaPIdSTCDMSCLeafD2.javaPIdSTCDMSCMappedSuperclass.javaPIdSTCDMSCRootEntity.java
intdiscriminator
PIdSTIDMSCEntityB.javaPIdSTIDMSCEntityD.javaPIdSTIDMSCLeafA.javaPIdSTIDMSCLeafB1.javaPIdSTIDMSCLeafB2.javaPIdSTIDMSCLeafC.javaPIdSTIDMSCLeafD1.javaPIdSTIDMSCLeafD2.javaPIdSTIDMSCMappedSuperclass.javaPIdSTIDMSCRootEntity.java
stringdiscriminator
testinterfaces
|
@ -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<RootEntity> resultList = (List<RootEntity>) 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<? extends RootEntity> actualType = entity.getClass();
|
||||||
|
Class<? extends RootEntity> 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<RootEntity> resultList = (List<RootEntity>) 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<? extends RootEntity> actualType = entity.getClass();
|
||||||
|
Class<? extends RootEntity> 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<RootEntity> resultList = (List<RootEntity>)
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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());
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
|
@ -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);
|
||||||
|
}
|
Loading…
Reference in New Issue