openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r908274 [1/3] - in /openjpa/branches/1.0.x: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/ op...
Date Tue, 09 Feb 2010 23:11:09 GMT
Author: mikedd
Date: Tue Feb  9 23:10:49 2010
New Revision: 908274

URL: http://svn.apache.org/viewvc?rev=908274&view=rev
Log:
OPENJPA-1061: 
Prevent ID collision on subclasses when the ID field is declared on a Mappedsuperclass. Merged to 1.0.x.
originally Submitted By : Jody Grassel

Added:
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/intdiscriminator/PIdJTIDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/stringdiscriminator/PIdJTSDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/chardiscriminator/PIdSTCDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/intdiscriminator/PIdSTIDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCEntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCEntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCLeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCMappedSuperclass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/singletable/stringdiscriminator/PIdSTSDMSCRootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityB.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/EntityD.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafA.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafB2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD1.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/LeafD2.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/MSC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/testinterfaces/RootEntity.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/BaseClass.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/MappedSuper.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SubclassC.java   (with props)
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SubclassD.java   (with props)
Modified:
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
    openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
    openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=908274&r1=908273&r2=908274&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Tue Feb  9 23:10:49 2010
@@ -1030,8 +1030,13 @@
             addCopyKeyFieldsToObjectIdMethod(false);
             addCopyKeyFieldsFromObjectIdMethod(true);
             addCopyKeyFieldsFromObjectIdMethod(false);
+            if (_meta.hasAbstractPKField() == true) {
+            	addGetIDOwningClass();
+            }
             addNewObjectIdInstanceMethod(true);
             addNewObjectIdInstanceMethod(false);
+        } else if (_meta.hasPKFieldsFromAbstractClass()) {
+            addGetIDOwningClass();
         }
     }
 
@@ -2413,14 +2418,28 @@
             // new ObjectId (cls, oid)
             code.anew().setType(ObjectId.class);
             code.dup();
-            code.classconstant().setClass(getType(_meta));
+            if (_meta.hasAbstractPKField() == false) {
+                code.classconstant().setClass(getType(_meta));
+            } else {
+                code.aload().setThis();
+                code.invokevirtual().setMethod(
+                        PRE + "GetIDOwningClass", Class.class, null);
+            }
         }
 
         // new <oid class> ();
         code.anew().setType(oidType);
         code.dup();
         if (_meta.isOpenJPAIdentity() || (obj && usesClsString == Boolean.TRUE))
-            code.classconstant().setClass(getType(_meta));
+        {
+        	if (_meta.hasAbstractPKField() == false) {
+        		code.classconstant().setClass(getType(_meta));
+        	} else {
+        	    code.aload().setThis();
+        	    code.invokevirtual().setMethod(
+        	            PRE + "GetIDOwningClass", Class.class, null);
+        	}
+        }
         if (obj) {
             code.aload().setParam(0);
             code.checkcast().setType(String.class);
@@ -2452,7 +2471,19 @@
         code.calculateMaxStack();
         code.calculateMaxLocals();
     }
+   
+    private void addGetIDOwningClass() throws NoSuchMethodException {
+    	 BCMethod method = _pc.declareMethod(PRE + "GetIDOwningClass",
+    			Class.class, null);
+        Code code = method.getCode(true);
+        
+        code.classconstant().setClass(getType(_meta));
+        code.areturn();       
 
+        code.calculateMaxStack();
+        code.calculateMaxLocals();       
+    }
+    
     /**
      * When communicating with the StateManager, many methods are used
      * depending on the class of state being passed. This method,

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=908274&r1=908273&r2=908274&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Tue Feb  9 23:10:49 2010
@@ -191,6 +191,9 @@
     private FetchGroup[] _fgs = null;
     private FetchGroup[] _customFGs = null;
     private boolean _intercepting = false;
+    private boolean _abstract = false;
+    private Boolean _hasAbstractPKField = null;
+    private Boolean _hasPKFieldsFromAbstractClass = null;
 
     private Boolean _isCacheable = null; 
 
@@ -2456,4 +2459,100 @@
        }
        return returnSet;
     }
+    
+    /**
+     * Returns true if the pcType modeled by this ClassMetaData
+     * object is abstract (ie, a MappedSuperclass in JPA terms.)
+     * 
+     * @return
+     */
+    public boolean isAbstract() {
+        return _abstract;
+    }
+
+    /**
+     * Sets the value determining if the pcType modeled by this
+     * ClassMetaData object is abstract (ie, a MappedSuperclass in JPA terms.)
+     * 
+     * @return
+     */
+    public void setAbstract(boolean flag) {
+        _abstract = flag;
+        _hasAbstractPKField = null;
+    }
+
+    /**
+     * Convenience method to determine if the pcType modeled by
+     * this ClassMetaData object is both abstract and declares PKFields. This
+     * method is used by the PCEnhancer to determine if special handling is
+     * required.
+     * 
+     * @return
+     */
+    public boolean hasAbstractPKField() {
+        if (_hasAbstractPKField != null) {
+            return _hasAbstractPKField.booleanValue();
+        }
+
+        // Default to false, set to true only if this type is abstract and
+        // declares a PKField.
+        _hasAbstractPKField = Boolean.FALSE;
+
+        if (isAbstract() == true) {
+            FieldMetaData[] declaredFields = getDeclaredFields();
+            if (declaredFields != null && declaredFields.length != 0) {
+                for(int i = 0 ; i < declaredFields.length; i ++) {
+                    if (declaredFields[i].isPrimaryKey()) {
+                        _hasAbstractPKField = Boolean.TRUE;
+                        break;
+                    }
+                }
+            }
+        }
+
+        return _hasAbstractPKField.booleanValue();
+    }
+
+    /**
+     * Convenience method to determine if this type is a direct
+     * decendent of an abstract type declaring PKFields. Returns true if there
+     * are no pcTypes mapped to a table between this type and an abstract pcType
+     * declaring PKFields. Returns false if there no such abstract pcTypes in
+     * the inheritance hierarchy or if there are any pcTypes mapped to tables in
+     * between the type represented by this ClassMetaData object and the
+     * abstract pcType declaring PKFields.
+     * 
+     * @return
+     */
+    public boolean hasPKFieldsFromAbstractClass() {
+        if (_hasPKFieldsFromAbstractClass != null) {
+            return _hasPKFieldsFromAbstractClass.booleanValue();
+        }
+
+        // Default to FALSE, until proven true.
+        _hasPKFieldsFromAbstractClass = Boolean.FALSE;
+
+        FieldMetaData[] pkFields = getPrimaryKeyFields();
+        FieldMetaData fmd; 
+        for(int i = 0 ; i < pkFields.length; i++) { 
+            fmd = pkFields[i];
+            ClassMetaData fmdDMDA = fmd.getDeclaringMetaData();
+            if (fmdDMDA.isAbstract()) {
+                ClassMetaData cmd = getPCSuperclassMetaData();
+                while (cmd != fmdDMDA) {
+                    if (fmdDMDA.isAbstract()) {
+                        cmd = cmd.getPCSuperclassMetaData();
+                    } else {
+                        break;
+                    }
+                }
+                if (cmd == fmdDMDA) {
+                    _hasPKFieldsFromAbstractClass = Boolean.TRUE;
+                    break;
+                }
+            }
+        }
+
+        return _hasPKFieldsFromAbstractClass.booleanValue();
+    }
 }

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java Tue Feb  9 23:10:49 2010
@@ -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);
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestInheritanceWithMSCID.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java Tue Feb  9 23:10:49 2010
@@ -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();
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMappedSuperclass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java Tue Feb  9 23:10:49 2010
@@ -0,0 +1,521 @@
+/*
+ * 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;
+
+import java.lang.reflect.Constructor;
+
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.
+    PrimitiveIDMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.chardiscriminator.PIdJTCDMSCRootEntity;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.intdiscriminator.PIdJTIDMSCRootEntity;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.
+    PIdJTSDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.jointable.stringdiscriminator.PIdJTSDMSCRootEntity;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.
+    PIdSTCDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.chardiscriminator.PIdSTCDMSCRootEntity;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.
+    PIdSTIDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.intdiscriminator.PIdSTIDMSCRootEntity;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCEntityB;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCEntityD;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafA;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafB1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafB2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafC;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafD1;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.PIdSTSDMSCLeafD2;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.singletable.stringdiscriminator.
+    PIdSTSDMSCMappedSuperclass;
+import org.apache.openjpa.persistence.inheritance.entities.idmsc.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/EntityMapping.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java Tue Feb  9 23:10:49 2010
@@ -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());
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/PrimitiveIDMappedSuperclass.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityB.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCEntityD.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafA.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafB2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafC.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD1.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java?rev=908274&view=auto
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java (added)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java Tue Feb  9 23:10:49 2010
@@ -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.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;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entities/idmsc/jointable/chardiscriminator/PIdJTCDMSCLeafD2.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message